Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(295)

Side by Side Diff: chrome/browser/instant/instant_loader.cc

Issue 11416187: Commit instant loader when the instant page navigates away from instant URL. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Removing content/* changes. Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/instant/instant_controller.h" 8 #include "chrome/browser/instant/instant_controller.h"
9 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h" 9 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h"
10 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h" 10 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h"
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 void InstantLoader::StopCapturingKeyStrokes() { 288 void InstantLoader::StopCapturingKeyStrokes() {
289 InstantSupportDetermined(true); 289 InstantSupportDetermined(true);
290 // NOTE(samarth): the current implementation of the key capturing (invisible 290 // NOTE(samarth): the current implementation of the key capturing (invisible
291 // focus) doesn't require doing anything explicitly here. 291 // focus) doesn't require doing anything explicitly here.
292 } 292 }
293 293
294 void InstantLoader::RenderViewGone() { 294 void InstantLoader::RenderViewGone() {
295 controller_->InstantLoaderRenderViewGone(); 295 controller_->InstantLoaderRenderViewGone();
296 } 296 }
297 297
298 void InstantLoader::AboutToNavigateMainFrame(const GURL& url) {
299 controller_->InstantLoaderAboutToNavigateMainFrame(url);
300 }
301
298 void InstantLoader::Observe(int type, 302 void InstantLoader::Observe(int type,
299 const content::NotificationSource& source, 303 const content::NotificationSource& source,
300 const content::NotificationDetails& details) { 304 const content::NotificationDetails& details) {
301 #if defined(OS_MACOSX) 305 #if defined(OS_MACOSX)
302 if (type == content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED) { 306 if (type == content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED) {
303 if (content::RenderWidgetHostView* rwhv = 307 if (content::RenderWidgetHostView* rwhv =
304 contents_->GetRenderWidgetHostView()) 308 contents_->GetRenderWidgetHostView())
305 rwhv->SetTakesFocusOnlyOnMouseDown(true); 309 rwhv->SetTakesFocusOnlyOnMouseDown(true);
306 return; 310 return;
307 } 311 }
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 content::WebContents* new_contents) { 383 content::WebContents* new_contents) {
380 DCHECK_EQ(old_contents, contents()); 384 DCHECK_EQ(old_contents, contents());
381 CleanupPreviewContents(); 385 CleanupPreviewContents();
382 // We release here without deleting so that the caller still has the 386 // We release here without deleting so that the caller still has the
383 // responsibility for deleting the WebContents. 387 // responsibility for deleting the WebContents.
384 ignore_result(contents_.release()); 388 ignore_result(contents_.release());
385 contents_.reset(new_contents); 389 contents_.reset(new_contents);
386 SetupPreviewContents(); 390 SetupPreviewContents();
387 controller_->SwappedWebContents(); 391 controller_->SwappedWebContents();
388 } 392 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698