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

Side by Side Diff: chrome/renderer/searchbox/searchbox.h

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: No longer commit on SearchBoxNavigate IPC. 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 #ifndef CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ 5 #ifndef CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_
6 #define CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ 6 #define CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/string16.h" 11 #include "base/string16.h"
12 #include "chrome/common/instant_types.h" 12 #include "chrome/common/instant_types.h"
13 #include "chrome/common/search_types.h" 13 #include "chrome/common/search_types.h"
14 #include "content/public/renderer/render_view_observer.h" 14 #include "content/public/renderer/render_view_observer.h"
15 #include "content/public/renderer/render_view_observer_tracker.h" 15 #include "content/public/renderer/render_view_observer_tracker.h"
16 #include "ui/gfx/rect.h" 16 #include "ui/gfx/rect.h"
17 17
18 namespace content { 18 namespace content {
19 class RenderView; 19 class RenderView;
20 } 20 }
21 21
22 class SearchBox : public content::RenderViewObserver, 22 class SearchBox : public content::RenderViewObserver,
23 public content::RenderViewObserverTracker<SearchBox> { 23 public content::RenderViewObserverTracker<SearchBox> {
24 public: 24 public:
25 explicit SearchBox(content::RenderView* render_view); 25 explicit SearchBox(content::RenderView* render_view);
26 virtual ~SearchBox(); 26 virtual ~SearchBox();
27 27
28 // Sends ViewHostMsg_SetSuggestions to the browser. 28 // Sends ChromeViewHostMsg_SetSuggestions to the browser.
29 void SetSuggestions(const std::vector<InstantSuggestion>& suggestions); 29 void SetSuggestions(const std::vector<InstantSuggestion>& suggestions);
30 30
31 // Sends ViewHostMsg_ShowInstantPreview to the browser. 31 // Sends ChromeViewHostMsg_ShowInstantPreview to the browser.
32 void ShowInstantPreview(InstantShownReason reason, 32 void ShowInstantPreview(InstantShownReason reason,
33 int height, 33 int height,
34 InstantSizeUnits units); 34 InstantSizeUnits units);
35 35
36 // Sends ViewHostMsg_StartCapturingKeyStrokes to the browser. 36 // Sends ChromeViewHostMsg_StartCapturingKeyStrokes to the browser.
37 void StartCapturingKeyStrokes(); 37 void StartCapturingKeyStrokes();
38 38
39 // Sends ViewHostMsg_StopCapturingKeyStrokes to the browser. 39 // Sends ChromeViewHostMsg_StopCapturingKeyStrokes to the browser.
40 void StopCapturingKeyStrokes(); 40 void StopCapturingKeyStrokes();
41 41
42 // Send ChromeViewHostMsg_SearchBoxNavigate to the browser.
43 void NavigateToURL(const GURL& url);
44
42 const string16& query() const { return query_; } 45 const string16& query() const { return query_; }
43 bool verbatim() const { return verbatim_; } 46 bool verbatim() const { return verbatim_; }
44 size_t selection_start() const { return selection_start_; } 47 size_t selection_start() const { return selection_start_; }
45 size_t selection_end() const { return selection_end_; } 48 size_t selection_end() const { return selection_end_; }
46 int results_base() const { return results_base_; } 49 int results_base() const { return results_base_; }
47 const chrome::search::Mode& mode() const { return mode_; } 50 const chrome::search::Mode& mode() const { return mode_; }
48 bool display_instant_results() const { return display_instant_results_; } 51 bool display_instant_results() const { return display_instant_results_; }
49 52
50 gfx::Rect GetRect(); 53 gfx::Rect GetRect();
51 const std::vector<InstantAutocompleteResult>& GetAutocompleteResults(); 54 const std::vector<InstantAutocompleteResult>& GetAutocompleteResults();
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 std::vector<InstantAutocompleteResult> last_autocomplete_results_; 93 std::vector<InstantAutocompleteResult> last_autocomplete_results_;
91 chrome::search::Mode mode_; 94 chrome::search::Mode mode_;
92 ThemeBackgroundInfo theme_info_; 95 ThemeBackgroundInfo theme_info_;
93 int theme_area_height_; 96 int theme_area_height_;
94 bool display_instant_results_; 97 bool display_instant_results_;
95 98
96 DISALLOW_COPY_AND_ASSIGN(SearchBox); 99 DISALLOW_COPY_AND_ASSIGN(SearchBox);
97 }; 100 };
98 101
99 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ 102 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698