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

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

Issue 11466007: Add new IPC for searchbox to pipe SearchBox NavigateContentWindow calls to the browser. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Addressing Samarth's comments. 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/history/history_tab_helper.h" 8 #include "chrome/browser/history/history_tab_helper.h"
9 #include "chrome/browser/instant/instant_controller.h" 9 #include "chrome/browser/instant/instant_controller.h"
10 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h" 10 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h"
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 void InstantLoader::StopCapturingKeyStrokes() { 290 void InstantLoader::StopCapturingKeyStrokes() {
291 InstantSupportDetermined(true); 291 InstantSupportDetermined(true);
292 // NOTE(samarth): the current implementation of the key capturing (invisible 292 // NOTE(samarth): the current implementation of the key capturing (invisible
293 // focus) doesn't require doing anything explicitly here. 293 // focus) doesn't require doing anything explicitly here.
294 } 294 }
295 295
296 void InstantLoader::RenderViewGone() { 296 void InstantLoader::RenderViewGone() {
297 controller_->InstantLoaderRenderViewGone(); 297 controller_->InstantLoaderRenderViewGone();
298 } 298 }
299 299
300 void InstantLoader::NavigateToURL(const GURL& url) {
301 InstantSupportDetermined(true);
302 controller_->NavigateToURL(url);
303 }
304
300 void InstantLoader::Observe(int type, 305 void InstantLoader::Observe(int type,
301 const content::NotificationSource& source, 306 const content::NotificationSource& source,
302 const content::NotificationDetails& details) { 307 const content::NotificationDetails& details) {
303 #if defined(OS_MACOSX) 308 #if defined(OS_MACOSX)
304 if (type == content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED) { 309 if (type == content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED) {
305 if (content::RenderWidgetHostView* rwhv = 310 if (content::RenderWidgetHostView* rwhv =
306 contents_->GetRenderWidgetHostView()) 311 contents_->GetRenderWidgetHostView())
307 rwhv->SetTakesFocusOnlyOnMouseDown(true); 312 rwhv->SetTakesFocusOnlyOnMouseDown(true);
308 return; 313 return;
309 } 314 }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 content::WebContents* new_contents) { 391 content::WebContents* new_contents) {
387 DCHECK_EQ(old_contents, contents()); 392 DCHECK_EQ(old_contents, contents());
388 CleanupPreviewContents(); 393 CleanupPreviewContents();
389 // We release here without deleting so that the caller still has the 394 // We release here without deleting so that the caller still has the
390 // responsibility for deleting the WebContents. 395 // responsibility for deleting the WebContents.
391 ignore_result(contents_.release()); 396 ignore_result(contents_.release());
392 contents_.reset(new_contents); 397 contents_.reset(new_contents);
393 SetupPreviewContents(); 398 SetupPreviewContents();
394 controller_->SwappedWebContents(); 399 controller_->SwappedWebContents();
395 } 400 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698