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

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

Issue 11644009: Added support for passing WindowOpenDisposition into BrowserInstantController::OpenURL() from the o… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 months 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 | Annotate | Revision Log
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/common/page_transition_types.h" 14 #include "content/public/common/page_transition_types.h"
15 #include "content/public/renderer/render_view_observer.h" 15 #include "content/public/renderer/render_view_observer.h"
16 #include "content/public/renderer/render_view_observer_tracker.h" 16 #include "content/public/renderer/render_view_observer_tracker.h"
17 #include "ui/gfx/rect.h" 17 #include "ui/gfx/rect.h"
18 #include "webkit/glue/window_open_disposition.h"
18 19
19 namespace content { 20 namespace content {
20 class RenderView; 21 class RenderView;
21 } 22 }
22 23
23 class SearchBox : public content::RenderViewObserver, 24 class SearchBox : public content::RenderViewObserver,
24 public content::RenderViewObserverTracker<SearchBox> { 25 public content::RenderViewObserverTracker<SearchBox> {
25 public: 26 public:
26 explicit SearchBox(content::RenderView* render_view); 27 explicit SearchBox(content::RenderView* render_view);
27 virtual ~SearchBox(); 28 virtual ~SearchBox();
28 29
29 // Sends ChromeViewHostMsg_SetSuggestions to the browser. 30 // Sends ChromeViewHostMsg_SetSuggestions to the browser.
30 void SetSuggestions(const std::vector<InstantSuggestion>& suggestions); 31 void SetSuggestions(const std::vector<InstantSuggestion>& suggestions);
31 32
32 // Sends ChromeViewHostMsg_ShowInstantPreview to the browser. 33 // Sends ChromeViewHostMsg_ShowInstantPreview to the browser.
33 void ShowInstantPreview(InstantShownReason reason, 34 void ShowInstantPreview(InstantShownReason reason,
34 int height, 35 int height,
35 InstantSizeUnits units); 36 InstantSizeUnits units);
36 37
37 // Sends ChromeViewHostMsg_StartCapturingKeyStrokes to the browser. 38 // Sends ChromeViewHostMsg_StartCapturingKeyStrokes to the browser.
38 void StartCapturingKeyStrokes(); 39 void StartCapturingKeyStrokes();
39 40
40 // Sends ChromeViewHostMsg_StopCapturingKeyStrokes to the browser. 41 // Sends ChromeViewHostMsg_StopCapturingKeyStrokes to the browser.
41 void StopCapturingKeyStrokes(); 42 void StopCapturingKeyStrokes();
42 43
43 // Send ChromeViewHostMsg_SearchBoxNavigate to the browser. 44 // Send ChromeViewHostMsg_SearchBoxNavigate to the browser.
44 void NavigateToURL(const GURL& url, content::PageTransition transition); 45 void NavigateToURL(const GURL& url,
46 content::PageTransition transition,
47 WindowOpenDisposition disposition);
45 48
46 const string16& query() const { return query_; } 49 const string16& query() const { return query_; }
47 bool verbatim() const { return verbatim_; } 50 bool verbatim() const { return verbatim_; }
48 size_t selection_start() const { return selection_start_; } 51 size_t selection_start() const { return selection_start_; }
49 size_t selection_end() const { return selection_end_; } 52 size_t selection_end() const { return selection_end_; }
50 int results_base() const { return results_base_; } 53 int results_base() const { return results_base_; }
51 const chrome::search::Mode& mode() const { return mode_; } 54 const chrome::search::Mode& mode() const { return mode_; }
52 bool is_key_capture_enabled() const { return is_key_capture_enabled_; } 55 bool is_key_capture_enabled() const { return is_key_capture_enabled_; }
53 bool display_instant_results() const { return display_instant_results_; } 56 bool display_instant_results() const { return display_instant_results_; }
54 const string16& omnibox_font() const { return omnibox_font_; } 57 const string16& omnibox_font() const { return omnibox_font_; }
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 ThemeBackgroundInfo theme_info_; 119 ThemeBackgroundInfo theme_info_;
117 int theme_area_height_; 120 int theme_area_height_;
118 bool display_instant_results_; 121 bool display_instant_results_;
119 string16 omnibox_font_; 122 string16 omnibox_font_;
120 size_t omnibox_font_size_; 123 size_t omnibox_font_size_;
121 124
122 DISALLOW_COPY_AND_ASSIGN(SearchBox); 125 DISALLOW_COPY_AND_ASSIGN(SearchBox);
123 }; 126 };
124 127
125 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ 128 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698