diff options
| author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-07 23:18:31 +0000 |
|---|---|---|
| committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-07 23:18:31 +0000 |
| commit | 862bb92e3ff4ef3661e79536e14771236eda8fe8 (patch) | |
| tree | 93cae5bb36b2fe3e3b412466400920746df8b6e8 | |
| parent | dfe376fc61d9dfd739274c6b502581f87e5fa7e3 (diff) | |
| download | chromium_src-862bb92e3ff4ef3661e79536e14771236eda8fe8.zip chromium_src-862bb92e3ff4ef3661e79536e14771236eda8fe8.tar.gz chromium_src-862bb92e3ff4ef3661e79536e14771236eda8fe8.tar.bz2 | |
TabContentsWrapper -> TabContents, part 10.
Debugger.
BUG=131026
TEST=no change
Review URL: https://chromiumcodereview.appspot.com/10533051
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141110 0039d316-1c4b-4281-b951-d872f2087c98
| -rw-r--r-- | chrome/browser/debugger/devtools_sanity_browsertest.cc | 5 | ||||
| -rw-r--r-- | chrome/browser/debugger/devtools_window.cc | 25 | ||||
| -rw-r--r-- | chrome/browser/debugger/devtools_window.h | 12 |
3 files changed, 19 insertions, 23 deletions
diff --git a/chrome/browser/debugger/devtools_sanity_browsertest.cc b/chrome/browser/debugger/devtools_sanity_browsertest.cc index 1676cbe..5d414b6 100644 --- a/chrome/browser/debugger/devtools_sanity_browsertest.cc +++ b/chrome/browser/debugger/devtools_sanity_browsertest.cc @@ -16,7 +16,7 @@ #include "chrome/browser/extensions/unpacked_installer.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" -#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" +#include "chrome/browser/ui/tab_contents/tab_contents.h" #include "chrome/common/chrome_notification_types.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" @@ -533,8 +533,7 @@ IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestReattachAfterCrash) { ui_test_utils::WindowedNotificationObserver observer( content::NOTIFICATION_LOAD_STOP, content::Source<NavigationController>( - &browser()->GetSelectedTabContentsWrapper()->web_contents()-> - GetController())); + &browser()->GetActiveWebContents()->GetController())); browser()->Reload(CURRENT_TAB); observer.Wait(); diff --git a/chrome/browser/debugger/devtools_window.cc b/chrome/browser/debugger/devtools_window.cc index 119ce12..1f36652 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) { diff --git a/chrome/browser/debugger/devtools_window.h b/chrome/browser/debugger/devtools_window.h index 8a4f8ff..ebd413d 100644 --- a/chrome/browser/debugger/devtools_window.h +++ b/chrome/browser/debugger/devtools_window.h @@ -28,7 +28,6 @@ class BrowserWindow; class PrefService; class Profile; class TabContents; -typedef TabContents TabContentsWrapper; namespace base { class Value; @@ -48,8 +47,7 @@ class DevToolsWindow : private content::NotificationObserver, public: static const char kDevToolsApp[]; static void RegisterUserPrefs(PrefService* prefs); - static TabContentsWrapper* GetDevToolsContents( - content::WebContents* inspected_tab); + static TabContents* GetDevToolsContents(content::WebContents* inspected_tab); static bool IsDevToolsWindow(content::RenderViewHost* window_rvh); static DevToolsWindow* OpenDevToolsWindowForWorker( @@ -73,7 +71,7 @@ class DevToolsWindow : private content::NotificationObserver, void Show(DevToolsToggleAction action); - TabContentsWrapper* tab_contents() { return tab_contents_; } + TabContents* tab_contents() { return tab_contents_; } Browser* browser() { return browser_; } // For tests. bool is_docked() { return docked_; } content::DevToolsClientHost* devtools_client_host() { @@ -84,7 +82,7 @@ class DevToolsWindow : private content::NotificationObserver, static DevToolsWindow* Create(Profile* profile, content::RenderViewHost* inspected_rvh, bool docked, bool shared_worker_frontend); - DevToolsWindow(TabContentsWrapper* tab_contents, Profile* profile, + DevToolsWindow(TabContents* tab_contents, Profile* profile, content::RenderViewHost* inspected_rvh, bool docked); void CreateDevToolsBrowser(); @@ -154,8 +152,8 @@ class DevToolsWindow : private content::NotificationObserver, void RequestSetDocked(bool docked); Profile* profile_; - TabContentsWrapper* inspected_tab_; - TabContentsWrapper* tab_contents_; + TabContents* inspected_tab_; + TabContents* tab_contents_; Browser* browser_; bool docked_; bool is_loaded_; |
