OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/instant/instant_loader.h" | 5 #include "chrome/browser/instant/instant_loader.h" |
6 | 6 |
7 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 7 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
8 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" | 8 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" |
9 #include "chrome/browser/favicon/favicon_tab_helper.h" | 9 #include "chrome/browser/favicon/favicon_tab_helper.h" |
10 #include "chrome/browser/history/history_tab_helper.h" | 10 #include "chrome/browser/history/history_tab_helper.h" |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 | 309 |
310 void InstantLoader::RenderViewGone() { | 310 void InstantLoader::RenderViewGone() { |
311 controller_->InstantLoaderRenderViewGone(); | 311 controller_->InstantLoaderRenderViewGone(); |
312 } | 312 } |
313 | 313 |
314 void InstantLoader::AboutToNavigateMainFrame(const GURL& url) { | 314 void InstantLoader::AboutToNavigateMainFrame(const GURL& url) { |
315 controller_->InstantLoaderAboutToNavigateMainFrame(url); | 315 controller_->InstantLoaderAboutToNavigateMainFrame(url); |
316 } | 316 } |
317 | 317 |
318 void InstantLoader::NavigateToURL(const GURL& url, | 318 void InstantLoader::NavigateToURL(const GURL& url, |
319 content::PageTransition transition) { | 319 content::PageTransition transition, |
| 320 WindowOpenDisposition disposition) { |
320 InstantSupportDetermined(true); | 321 InstantSupportDetermined(true); |
321 controller_->NavigateToURL(url, transition); | 322 controller_->NavigateToURL(url, transition, disposition); |
322 } | 323 } |
323 | 324 |
324 void InstantLoader::Observe(int type, | 325 void InstantLoader::Observe(int type, |
325 const content::NotificationSource& source, | 326 const content::NotificationSource& source, |
326 const content::NotificationDetails& details) { | 327 const content::NotificationDetails& details) { |
327 #if defined(OS_MACOSX) | 328 #if defined(OS_MACOSX) |
328 if (type == content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED) { | 329 if (type == content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED) { |
329 if (content::RenderWidgetHostView* rwhv = | 330 if (content::RenderWidgetHostView* rwhv = |
330 contents_->GetRenderWidgetHostView()) | 331 contents_->GetRenderWidgetHostView()) |
331 rwhv->SetTakesFocusOnlyOnMouseDown(true); | 332 rwhv->SetTakesFocusOnlyOnMouseDown(true); |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 content::WebContents* new_contents) { | 409 content::WebContents* new_contents) { |
409 DCHECK_EQ(old_contents, contents()); | 410 DCHECK_EQ(old_contents, contents()); |
410 CleanupPreviewContents(); | 411 CleanupPreviewContents(); |
411 // We release here without deleting so that the caller still has the | 412 // We release here without deleting so that the caller still has the |
412 // responsibility for deleting the WebContents. | 413 // responsibility for deleting the WebContents. |
413 ignore_result(contents_.release()); | 414 ignore_result(contents_.release()); |
414 contents_.reset(new_contents); | 415 contents_.reset(new_contents); |
415 SetupPreviewContents(); | 416 SetupPreviewContents(); |
416 controller_->SwappedWebContents(); | 417 controller_->SwappedWebContents(); |
417 } | 418 } |
OLD | NEW |