Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4820)

Unified Diff: chrome/browser/debugger/devtools_window.cc

Issue 10533051: TabContentsWrapper -> TabContents, part 10. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/debugger/devtools_window.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/debugger/devtools_window.cc
diff --git a/chrome/browser/debugger/devtools_window.cc b/chrome/browser/debugger/devtools_window.cc
index 119ce1280a9600d1620fb244183fc52288487505..1f366523da4f138e7abb87fabe5977361ab4ca28 100644
--- a/chrome/browser/debugger/devtools_window.cc
+++ b/chrome/browser/debugger/devtools_window.cc
@@ -23,7 +23,7 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_window.h"
-#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
@@ -81,8 +81,7 @@ void DevToolsWindow::RegisterUserPrefs(PrefService* prefs) {
}
// static
-TabContentsWrapper* DevToolsWindow::GetDevToolsContents(
- WebContents* inspected_tab) {
+TabContents* DevToolsWindow::GetDevToolsContents(WebContents* inspected_tab) {
if (!inspected_tab)
return NULL;
@@ -172,8 +171,8 @@ DevToolsWindow* DevToolsWindow::Create(
RenderViewHost* inspected_rvh,
bool docked,
bool shared_worker_frontend) {
- // Create TabContentsWrapper with devtools.
- TabContentsWrapper* tab_contents =
+ // Create TabContents with devtools.
+ TabContents* tab_contents =
Browser::TabContentsFactory(profile, NULL, MSG_ROUTING_NONE, NULL, NULL);
tab_contents->web_contents()->GetRenderViewHost()->AllowBindings(
content::BINDINGS_POLICY_WEB_UI);
@@ -185,7 +184,7 @@ DevToolsWindow* DevToolsWindow::Create(
return new DevToolsWindow(tab_contents, profile, inspected_rvh, docked);
}
-DevToolsWindow::DevToolsWindow(TabContentsWrapper* tab_contents,
+DevToolsWindow::DevToolsWindow(TabContents* tab_contents,
Profile* profile,
RenderViewHost* inspected_rvh,
bool docked)
@@ -228,7 +227,7 @@ DevToolsWindow::DevToolsWindow(TabContentsWrapper* tab_contents,
if (inspected_rvh) {
WebContents* tab = WebContents::FromRenderViewHost(inspected_rvh);
if (tab)
- inspected_tab_ = TabContentsWrapper::GetCurrentWrapperForContents(tab);
+ inspected_tab_ = TabContents::GetOwningTabContentsForWebContents(tab);
}
}
@@ -263,13 +262,13 @@ void DevToolsWindow::InspectedContentsClosing() {
}
void DevToolsWindow::ContentsReplaced(WebContents* new_contents) {
- TabContentsWrapper* new_tab_wrapper =
- TabContentsWrapper::GetCurrentWrapperForContents(new_contents);
- DCHECK(new_tab_wrapper);
- if (!new_tab_wrapper)
+ TabContents* new_tab_contents =
+ TabContents::GetOwningTabContentsForWebContents(new_contents);
+ DCHECK(new_tab_contents);
+ if (!new_tab_contents)
return;
- DCHECK_EQ(profile_, new_tab_wrapper->profile());
- inspected_tab_ = new_tab_wrapper;
+ DCHECK_EQ(profile_, new_tab_contents->profile());
+ inspected_tab_ = new_tab_contents;
}
void DevToolsWindow::Show(DevToolsToggleAction action) {
« no previous file with comments | « chrome/browser/debugger/devtools_window.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698