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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 } | 311 } |
312 | 312 |
313 void InstantLoader::RenderViewGone() { | 313 void InstantLoader::RenderViewGone() { |
314 controller_->InstantLoaderRenderViewGone(); | 314 controller_->InstantLoaderRenderViewGone(); |
315 } | 315 } |
316 | 316 |
317 void InstantLoader::AboutToNavigateMainFrame(const GURL& url) { | 317 void InstantLoader::AboutToNavigateMainFrame(const GURL& url) { |
318 controller_->InstantLoaderAboutToNavigateMainFrame(url); | 318 controller_->InstantLoaderAboutToNavigateMainFrame(url); |
319 } | 319 } |
320 | 320 |
| 321 void InstantLoader::NavigateToURL(const GURL& url, |
| 322 content::PageTransition transition) { |
| 323 InstantSupportDetermined(true); |
| 324 controller_->NavigateToURL(url, transition); |
| 325 } |
| 326 |
321 void InstantLoader::Observe(int type, | 327 void InstantLoader::Observe(int type, |
322 const content::NotificationSource& source, | 328 const content::NotificationSource& source, |
323 const content::NotificationDetails& details) { | 329 const content::NotificationDetails& details) { |
324 #if defined(OS_MACOSX) | 330 #if defined(OS_MACOSX) |
325 if (type == content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED) { | 331 if (type == content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED) { |
326 if (content::RenderWidgetHostView* rwhv = | 332 if (content::RenderWidgetHostView* rwhv = |
327 contents_->GetRenderWidgetHostView()) | 333 contents_->GetRenderWidgetHostView()) |
328 rwhv->SetTakesFocusOnlyOnMouseDown(true); | 334 rwhv->SetTakesFocusOnlyOnMouseDown(true); |
329 return; | 335 return; |
330 } | 336 } |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 content::WebContents* new_contents) { | 419 content::WebContents* new_contents) { |
414 DCHECK_EQ(old_contents, contents()); | 420 DCHECK_EQ(old_contents, contents()); |
415 CleanupPreviewContents(); | 421 CleanupPreviewContents(); |
416 // We release here without deleting so that the caller still has the | 422 // We release here without deleting so that the caller still has the |
417 // responsibility for deleting the WebContents. | 423 // responsibility for deleting the WebContents. |
418 ignore_result(contents_.release()); | 424 ignore_result(contents_.release()); |
419 contents_.reset(new_contents); | 425 contents_.reset(new_contents); |
420 SetupPreviewContents(); | 426 SetupPreviewContents(); |
421 controller_->SwappedWebContents(); | 427 controller_->SwappedWebContents(); |
422 } | 428 } |
OLD | NEW |