diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-20 23:09:25 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-20 23:09:25 +0000 |
commit | 992e454546e7592443c1967c3e5b9262420f2ae0 (patch) | |
tree | 793788e9c5283fa5fe9e9ee0c084fa79556ea309 /chrome/browser/debugger | |
parent | e4876b29d769e62971fc67fe0ab0efab7512e3d1 (diff) | |
download | chromium_src-992e454546e7592443c1967c3e5b9262420f2ae0.zip chromium_src-992e454546e7592443c1967c3e5b9262420f2ae0.tar.gz chromium_src-992e454546e7592443c1967c3e5b9262420f2ae0.tar.bz2 |
Make PageNavigator::OpenURL and TabContentsDelegate::OpenURLFromTab return a TabContents
The TabContents object is the one in which the URL will be opened if it can be determined immediately.
BUG=none
TEST=compiles
Review URL: http://codereview.chromium.org/7343013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93275 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/debugger')
-rw-r--r-- | chrome/browser/debugger/devtools_window.cc | 13 | ||||
-rw-r--r-- | chrome/browser/debugger/devtools_window.h | 11 |
2 files changed, 13 insertions, 11 deletions
diff --git a/chrome/browser/debugger/devtools_window.cc b/chrome/browser/debugger/devtools_window.cc index aa697cd..eda78d8 100644 --- a/chrome/browser/debugger/devtools_window.cc +++ b/chrome/browser/debugger/devtools_window.cc @@ -398,15 +398,16 @@ void DevToolsWindow::AddDevToolsExtensionsToClient() { CallClientFunction(ASCIIToUTF16("WebInspector.addExtensions"), results); } -void DevToolsWindow::OpenURLFromTab(TabContents* source, - const GURL& url, - const GURL& referrer, - WindowOpenDisposition disposition, - PageTransition::Type transition) { +TabContents* DevToolsWindow::OpenURLFromTab(TabContents* source, + const GURL& url, + const GURL& referrer, + WindowOpenDisposition disposition, + PageTransition::Type transition) { if (inspected_tab_) { - inspected_tab_->tab_contents()->OpenURL( + return inspected_tab_->tab_contents()->OpenURL( url, GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK); } + return NULL; } void DevToolsWindow::CallClientFunction(const string16& function_name, diff --git a/chrome/browser/debugger/devtools_window.h b/chrome/browser/debugger/devtools_window.h index 3d1e706..569a747 100644 --- a/chrome/browser/debugger/devtools_window.h +++ b/chrome/browser/debugger/devtools_window.h @@ -90,11 +90,12 @@ class DevToolsWindow void CallClientFunction(const string16& function_name, const base::Value& arg); // Overridden from TabContentsDelegate. - virtual void OpenURLFromTab(TabContents* source, - const GURL& url, - const GURL& referrer, - WindowOpenDisposition disposition, - PageTransition::Type transition); + virtual TabContents* OpenURLFromTab( + TabContents* source, + const GURL& url, + const GURL& referrer, + WindowOpenDisposition disposition, + PageTransition::Type transition); virtual void AddNewContents(TabContents* source, TabContents* new_contents, WindowOpenDisposition disposition, |