diff options
| author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-18 16:17:49 +0000 |
|---|---|---|
| committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-18 16:17:49 +0000 |
| commit | 3c9e187bd8ec34ebf2a91a37c868584c465647e8 (patch) | |
| tree | 84c9540d220fa155cf2af8c944638c0719dee670 /chrome/browser/debugger/devtools_window.cc | |
| parent | 3e35b224fd0c36f17f432f23e2eb3729667210b1 (diff) | |
| download | chromium_src-3c9e187bd8ec34ebf2a91a37c868584c465647e8.zip chromium_src-3c9e187bd8ec34ebf2a91a37c868584c465647e8.tar.gz chromium_src-3c9e187bd8ec34ebf2a91a37c868584c465647e8.tar.bz2 | |
Make pink's TabContentsWrapper change compile on Windows.
Code by pinkerton@, with modifications by evanm and myself to get it to build on windows/linux/chromeos.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/4694008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66626 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/debugger/devtools_window.cc')
| -rw-r--r-- | chrome/browser/debugger/devtools_window.cc | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/chrome/browser/debugger/devtools_window.cc b/chrome/browser/debugger/devtools_window.cc index 5b2d265..b18703c 100644 --- a/chrome/browser/debugger/devtools_window.cc +++ b/chrome/browser/debugger/devtools_window.cc @@ -22,6 +22,7 @@ #include "chrome/browser/tab_contents/navigation_entry.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/browser/tab_contents/tab_contents_view.h" +#include "chrome/browser/tab_contents_wrapper.h" #include "chrome/browser/tabs/tab_strip_model.h" #include "chrome/browser/themes/browser_theme_provider.h" #include "chrome/browser/ui/browser.h" @@ -53,7 +54,7 @@ TabContents* DevToolsWindow::GetDevToolsContents(TabContents* inspected_tab) { if (!window || !window->is_docked()) { return NULL; } - return window->tab_contents(); + return window->tab_contents()->tab_contents(); } DevToolsWindow::DevToolsWindow(Profile* profile, @@ -65,8 +66,10 @@ DevToolsWindow::DevToolsWindow(Profile* profile, is_loaded_(false), action_on_load_(DEVTOOLS_TOGGLE_ACTION_NONE) { // Create TabContents with devtools. - tab_contents_ = new TabContents(profile, NULL, MSG_ROUTING_NONE, NULL, NULL); - tab_contents_->render_view_host()->AllowBindings(BindingsPolicy::DOM_UI); + tab_contents_ = + Browser::TabContentsFactory(profile, NULL, MSG_ROUTING_NONE, NULL, NULL); + tab_contents_->tab_contents()-> + render_view_host()->AllowBindings(BindingsPolicy::DOM_UI); tab_contents_->controller().LoadURL( GetDevToolsUrl(), GURL(), PageTransition::START_PAGE); @@ -95,7 +98,8 @@ DevToolsWindow* DevToolsWindow::AsDevToolsWindow() { } void DevToolsWindow::SendMessageToClient(const IPC::Message& message) { - RenderViewHost* target_host = tab_contents_->render_view_host(); + RenderViewHost* target_host = + tab_contents_->tab_contents()->render_view_host(); IPC::Message* m = new IPC::Message(message); m->set_routing_id(target_host->routing_id()); target_host->Send(m); @@ -130,7 +134,7 @@ void DevToolsWindow::Show(DevToolsToggleAction action) { if (FindInspectedBrowserAndTabIndex(&inspected_browser, &inspected_tab_index)) { BrowserWindow* inspected_window = inspected_browser->window(); - tab_contents_->set_delegate(this); + tab_contents_->tab_contents()->set_delegate(this); inspected_window->UpdateDevTools(); SetAttachedWindow(); tab_contents_->view()->SetInitialFocus(); @@ -270,8 +274,9 @@ void DevToolsWindow::AddDevToolsExtensionsToClient() { CallClientFunction(L"WebInspector.setInspectedTabId", tabId); } ListValue results; - const ExtensionsService* extension_service = tab_contents_->profile()-> - GetOriginalProfile()->GetExtensionsService(); + const ExtensionsService* extension_service = + tab_contents_->tab_contents()->profile()-> + GetOriginalProfile()->GetExtensionsService(); const ExtensionList* extensions = extension_service->extensions(); for (ExtensionList::const_iterator extension = extensions->begin(); |
