Chromium Code Reviews| Index: chrome/browser/instant/instant_loader.cc |
| diff --git a/chrome/browser/instant/instant_loader.cc b/chrome/browser/instant/instant_loader.cc |
| index e6f2b7930a104bc970ae10fca7cba12ca1f01d95..3c193adb3e57ea91d03e907013adbb4ed9edc46d 100644 |
| --- a/chrome/browser/instant/instant_loader.cc |
| +++ b/chrome/browser/instant/instant_loader.cc |
| @@ -70,6 +70,9 @@ class InstantLoader::WebContentsDelegateImpl |
| virtual void HandleGestureEnd() OVERRIDE; |
| virtual void DragEnded() OVERRIDE; |
| virtual bool OnGoToEntryOffset(int offset) OVERRIDE; |
| + virtual content::WebContents* OpenURLFromTab( |
| + content::WebContents* source, |
| + const content::OpenURLParams& params) OVERRIDE; |
| void MaybeCommitFromPointerRelease(); |
| @@ -155,6 +158,16 @@ bool InstantLoader::WebContentsDelegateImpl::OnGoToEntryOffset(int offset) { |
| return false; |
| } |
| +content::WebContents* InstantLoader::WebContentsDelegateImpl::OpenURLFromTab( |
| + content::WebContents* source, |
| + const content::OpenURLParams& params) { |
| + content::WebContents* preview = loader_->contents_.get(); |
| + if (loader_->controller_->CommitIfCurrent(INSTANT_COMMIT_NAVIGATED)) |
|
sky
2012/12/10 14:47:30
Style guide says you want one of the following her
Shishir
2012/12/10 18:35:52
Done.
|
| + return preview->GetDelegate()->OpenURLFromTab(source, params); |
| + else |
| + return NULL; |
| +} |
| + |
| void InstantLoader::WebContentsDelegateImpl::MaybeCommitFromPointerRelease() { |
| if (loader_->is_pointer_down_from_activate_) { |
| loader_->is_pointer_down_from_activate_ = false; |
| @@ -295,6 +308,10 @@ void InstantLoader::RenderViewGone() { |
| controller_->InstantLoaderRenderViewGone(); |
| } |
| +void InstantLoader::AboutToNavigateMainFrame(const GURL& url) { |
| + controller_->InstantLoaderAboutToNavigateMainFrame(url); |
| +} |
| + |
| void InstantLoader::Observe(int type, |
| const content::NotificationSource& source, |
| const content::NotificationDetails& details) { |