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/history/history_tab_helper.h" | 9 #include "chrome/browser/history/history_tab_helper.h" |
10 #include "chrome/browser/instant/instant_controller.h" | 10 #include "chrome/browser/instant/instant_controller.h" |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 } | 307 } |
308 | 308 |
309 void InstantLoader::RenderViewGone() { | 309 void InstantLoader::RenderViewGone() { |
310 controller_->InstantLoaderRenderViewGone(); | 310 controller_->InstantLoaderRenderViewGone(); |
311 } | 311 } |
312 | 312 |
313 void InstantLoader::AboutToNavigateMainFrame(const GURL& url) { | 313 void InstantLoader::AboutToNavigateMainFrame(const GURL& url) { |
314 controller_->InstantLoaderAboutToNavigateMainFrame(url); | 314 controller_->InstantLoaderAboutToNavigateMainFrame(url); |
315 } | 315 } |
316 | 316 |
| 317 void InstantLoader::NavigateToURL(const GURL& url) { |
| 318 InstantSupportDetermined(true); |
| 319 controller_->NavigateToURL(url); |
| 320 } |
| 321 |
317 void InstantLoader::Observe(int type, | 322 void InstantLoader::Observe(int type, |
318 const content::NotificationSource& source, | 323 const content::NotificationSource& source, |
319 const content::NotificationDetails& details) { | 324 const content::NotificationDetails& details) { |
320 #if defined(OS_MACOSX) | 325 #if defined(OS_MACOSX) |
321 if (type == content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED) { | 326 if (type == content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED) { |
322 if (content::RenderWidgetHostView* rwhv = | 327 if (content::RenderWidgetHostView* rwhv = |
323 contents_->GetRenderWidgetHostView()) | 328 contents_->GetRenderWidgetHostView()) |
324 rwhv->SetTakesFocusOnlyOnMouseDown(true); | 329 rwhv->SetTakesFocusOnlyOnMouseDown(true); |
325 return; | 330 return; |
326 } | 331 } |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 content::WebContents* new_contents) { | 411 content::WebContents* new_contents) { |
407 DCHECK_EQ(old_contents, contents()); | 412 DCHECK_EQ(old_contents, contents()); |
408 CleanupPreviewContents(); | 413 CleanupPreviewContents(); |
409 // We release here without deleting so that the caller still has the | 414 // We release here without deleting so that the caller still has the |
410 // responsibility for deleting the WebContents. | 415 // responsibility for deleting the WebContents. |
411 ignore_result(contents_.release()); | 416 ignore_result(contents_.release()); |
412 contents_.reset(new_contents); | 417 contents_.reset(new_contents); |
413 SetupPreviewContents(); | 418 SetupPreviewContents(); |
414 controller_->SwappedWebContents(); | 419 controller_->SwappedWebContents(); |
415 } | 420 } |
OLD | NEW |