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

Side by Side Diff: chrome/renderer/searchbox/searchbox.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: Remove extra ; 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
« no previous file with comments | « chrome/renderer/searchbox/searchbox.h ('k') | chrome/renderer/searchbox/searchbox_extension.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/renderer/searchbox/searchbox.h" 5 #include "chrome/renderer/searchbox/searchbox.h"
6 6
7 #include "chrome/common/render_messages.h" 7 #include "chrome/common/render_messages.h"
8 #include "chrome/renderer/searchbox/searchbox_extension.h" 8 #include "chrome/renderer/searchbox/searchbox_extension.h"
9 #include "content/public/renderer/render_view.h" 9 #include "content/public/renderer/render_view.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 void SearchBox::StartCapturingKeyStrokes() { 49 void SearchBox::StartCapturingKeyStrokes() {
50 render_view()->Send(new ChromeViewHostMsg_StartCapturingKeyStrokes( 50 render_view()->Send(new ChromeViewHostMsg_StartCapturingKeyStrokes(
51 render_view()->GetRoutingID(), render_view()->GetPageId())); 51 render_view()->GetRoutingID(), render_view()->GetPageId()));
52 } 52 }
53 53
54 void SearchBox::StopCapturingKeyStrokes() { 54 void SearchBox::StopCapturingKeyStrokes() {
55 render_view()->Send(new ChromeViewHostMsg_StopCapturingKeyStrokes( 55 render_view()->Send(new ChromeViewHostMsg_StopCapturingKeyStrokes(
56 render_view()->GetRoutingID(), render_view()->GetPageId())); 56 render_view()->GetRoutingID(), render_view()->GetPageId()));
57 } 57 }
58 58
59 void SearchBox::NavigateToURL(const GURL& url,
60 content::PageTransition transition) {
61 render_view()->Send(new ChromeViewHostMsg_SearchBoxNavigate(
62 render_view()->GetRoutingID(), render_view()->GetPageId(),
63 url, transition));
64 }
65
59 gfx::Rect SearchBox::GetRect() { 66 gfx::Rect SearchBox::GetRect() {
60 // Need to adjust for scale. 67 // Need to adjust for scale.
61 if (rect_.IsEmpty()) 68 if (rect_.IsEmpty())
62 return rect_; 69 return rect_;
63 WebKit::WebView* web_view = render_view()->GetWebView(); 70 WebKit::WebView* web_view = render_view()->GetWebView();
64 if (!web_view) 71 if (!web_view)
65 return rect_; 72 return rect_;
66 double zoom = WebKit::WebView::zoomLevelToZoomFactor(web_view->zoomLevel()); 73 double zoom = WebKit::WebView::zoomLevelToZoomFactor(web_view->zoomLevel());
67 if (zoom == 0) 74 if (zoom == 0)
68 return rect_; 75 return rect_;
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 rect_ = gfx::Rect(); 262 rect_ = gfx::Rect();
256 autocomplete_results_.clear(); 263 autocomplete_results_.clear();
257 is_key_capture_enabled_ = false; 264 is_key_capture_enabled_ = false;
258 mode_ = chrome::search::Mode(); 265 mode_ = chrome::search::Mode();
259 theme_info_ = ThemeBackgroundInfo(); 266 theme_info_ = ThemeBackgroundInfo();
260 theme_area_height_ = 0; 267 theme_area_height_ = 0;
261 // Don't reset display_instant_results_ to prevent clearing it on committed 268 // Don't reset display_instant_results_ to prevent clearing it on committed
262 // results pages in extended mode. Otherwise resetting it is a no-op because 269 // results pages in extended mode. Otherwise resetting it is a no-op because
263 // a new loader is created when it changes; see crbug.com/164662. 270 // a new loader is created when it changes; see crbug.com/164662.
264 } 271 }
OLDNEW
« no previous file with comments | « chrome/renderer/searchbox/searchbox.h ('k') | chrome/renderer/searchbox/searchbox_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698