~osomon/oxide/ensure-files-exist

« back to all changes in this revision

Viewing changes to shared/browser/oxide_devtools_http_handler_delegate.cc

  • Committer: Olivier Tilloy
  • Date: 2014-09-25 16:27:09 UTC
  • mfrom: (677.1.95 oxide)
  • Revision ID: olivier.tilloy@canonical.com-20140925162709-h8bai0f1nfaf7cfy
Merge the latest changes from trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
namespace oxide {
43
43
 
44
44
DevtoolsHttpHandlerDelegate::DevtoolsHttpHandlerDelegate(
45
 
      const std::string& ip,
46
 
      unsigned port,
47
 
      BrowserContext * attached_browser_context)
48
 
    : ip_(ip),
49
 
      port_(port),
50
 
      browser_context_(attached_browser_context) {
51
 
    LOG(INFO) << "DevTools instance running "
52
 
              << GetLocalDevToolsUrl();
53
 
}
 
45
    BrowserContext * attached_browser_context)
 
46
    : browser_context_(attached_browser_context) {}
54
47
 
55
 
DevtoolsHttpHandlerDelegate::~DevtoolsHttpHandlerDelegate() {
56
 
}
 
48
DevtoolsHttpHandlerDelegate::~DevtoolsHttpHandlerDelegate() {}
57
49
 
58
50
std::string DevtoolsHttpHandlerDelegate::GetDiscoveryPageHTML() {
59
51
  return ui::ResourceBundle::GetSharedInstance().GetRawDataResource(
60
52
    IDR_OXIDE_DEVTOOLS_DISCOVERY_HTML_PAGE).as_string();
61
53
}
62
54
 
63
 
std::string
64
 
DevtoolsHttpHandlerDelegate::GetLocalDevToolsUrl() const {
65
 
  std::ostringstream oss;
66
 
  oss << "http://"
67
 
      << ip_
68
 
      << ":"
69
 
      << port_;
70
 
  return oss.str();
71
 
}
72
 
 
73
55
bool DevtoolsHttpHandlerDelegate::BundlesFrontendResources() {
74
56
  // We reuse the default chrome builtin webui from devtools_resources.pak
75
57
  return true;