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

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: 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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 InstantSupportDetermined(true); 284 InstantSupportDetermined(true);
285 controller_->StartCapturingKeyStrokes(); 285 controller_->StartCapturingKeyStrokes();
286 } 286 }
287 287
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::NavigateToURL(const GURL& url) {
295 controller_->NavigateToURL(url);
samarth 2012/12/07 02:01:35 Also call InstantSupportDetermined
Shishir 2012/12/10 20:40:39 Added. Not sure why that is needed. The SearchBox
296 }
297
294 void InstantLoader::Observe(int type, 298 void InstantLoader::Observe(int type,
295 const content::NotificationSource& source, 299 const content::NotificationSource& source,
296 const content::NotificationDetails& details) { 300 const content::NotificationDetails& details) {
297 #if defined(OS_MACOSX) 301 #if defined(OS_MACOSX)
298 if (type == content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED) { 302 if (type == content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED) {
299 if (content::RenderWidgetHostView* rwhv = 303 if (content::RenderWidgetHostView* rwhv =
300 contents_->GetRenderWidgetHostView()) 304 contents_->GetRenderWidgetHostView())
301 rwhv->SetTakesFocusOnlyOnMouseDown(true); 305 rwhv->SetTakesFocusOnlyOnMouseDown(true);
302 return; 306 return;
303 } 307 }
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 content::WebContents* new_contents) { 379 content::WebContents* new_contents) {
376 DCHECK_EQ(old_contents, contents()); 380 DCHECK_EQ(old_contents, contents());
377 CleanupPreviewContents(); 381 CleanupPreviewContents();
378 // We release here without deleting so that the caller still has the 382 // We release here without deleting so that the caller still has the
379 // responsibility for deleting the WebContents. 383 // responsibility for deleting the WebContents.
380 ignore_result(contents_.release()); 384 ignore_result(contents_.release());
381 contents_.reset(new_contents); 385 contents_.reset(new_contents);
382 SetupPreviewContents(); 386 SetupPreviewContents();
383 controller_->SwappedWebContents(); 387 controller_->SwappedWebContents();
384 } 388 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698