summaryrefslogtreecommitdiffstats
path: root/chrome/browser/debugger
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/debugger')
-rw-r--r--chrome/browser/debugger/devtools_http_protocol_handler.cc6
-rw-r--r--chrome/browser/debugger/devtools_window.cc19
-rw-r--r--chrome/browser/debugger/devtools_window.h6
-rw-r--r--chrome/browser/debugger/inspectable_tab_proxy.cc1
4 files changed, 20 insertions, 12 deletions
diff --git a/chrome/browser/debugger/devtools_http_protocol_handler.cc b/chrome/browser/debugger/devtools_http_protocol_handler.cc
index 24be8b6..5327008 100644
--- a/chrome/browser/debugger/devtools_http_protocol_handler.cc
+++ b/chrome/browser/debugger/devtools_http_protocol_handler.cc
@@ -15,6 +15,7 @@
#include "chrome/browser/debugger/devtools_client_host.h"
#include "chrome/browser/debugger/devtools_manager.h"
#include "chrome/browser/profile.h"
+#include "chrome/browser/tab_contents_wrapper.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/browser/ui/browser.h"
@@ -173,7 +174,7 @@ void DevToolsHttpProtocolHandler::OnHttpRequestUI(
end = BrowserList::end(); it != end; ++it) {
TabStripModel* model = (*it)->tabstrip_model();
for (int i = 0, size = model->count(); i < size; ++i) {
- TabContents* tab_contents = model->GetTabContentsAt(i);
+ TabContentsWrapper* tab_contents = model->GetTabContentsAt(i);
NavigationController& controller = tab_contents->controller();
NavigationEntry* entry = controller.GetActiveEntry();
if (entry == NULL)
@@ -183,7 +184,8 @@ void DevToolsHttpProtocolHandler::OnHttpRequestUI(
continue;
DevToolsClientHost* client_host = DevToolsManager::GetInstance()->
- GetDevToolsClientHostFor(tab_contents->render_view_host());
+ GetDevToolsClientHostFor(tab_contents->tab_contents()->
+ render_view_host());
if (!client_host) {
response += StringPrintf(
"<a href='/devtools/devtools.html?page=%d'>%s (%s)</a><br>",
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();
diff --git a/chrome/browser/debugger/devtools_window.h b/chrome/browser/debugger/devtools_window.h
index 85d7e84..a9ba40d 100644
--- a/chrome/browser/debugger/devtools_window.h
+++ b/chrome/browser/debugger/devtools_window.h
@@ -24,7 +24,7 @@ class Browser;
class BrowserWindow;
class Profile;
class RenderViewHost;
-class TabContents;
+class TabContentsWrapper;
class Value;
class DevToolsWindow
@@ -48,7 +48,7 @@ class DevToolsWindow
void SetDocked(bool docked);
RenderViewHost* GetRenderViewHost();
- TabContents* tab_contents() { return tab_contents_; }
+ TabContentsWrapper* tab_contents() { return tab_contents_; }
Browser* browser() { return browser_; } // For tests.
bool is_docked() { return docked_; }
@@ -98,7 +98,7 @@ class DevToolsWindow
Profile* profile_;
TabContents* inspected_tab_;
- TabContents* tab_contents_;
+ TabContentsWrapper* tab_contents_;
Browser* browser_;
bool docked_;
bool is_loaded_;
diff --git a/chrome/browser/debugger/inspectable_tab_proxy.cc b/chrome/browser/debugger/inspectable_tab_proxy.cc
index eb9e4bc..5dd734f 100644
--- a/chrome/browser/debugger/inspectable_tab_proxy.cc
+++ b/chrome/browser/debugger/inspectable_tab_proxy.cc
@@ -11,6 +11,7 @@
#include "chrome/browser/debugger/devtools_client_host.h"
#include "chrome/browser/sessions/session_id.h"
#include "chrome/browser/tab_contents/tab_contents.h"
+#include "chrome/browser/tab_contents_wrapper.h"
#include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/common/devtools_messages.h"