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

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

Issue 663333002: Standardize usage of virtual/override/final in chrome/renderer/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
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/strings/string16.h" 11 #include "base/strings/string16.h"
12 #include "chrome/common/instant_restricted_id_cache.h" 12 #include "chrome/common/instant_restricted_id_cache.h"
13 #include "chrome/common/instant_types.h" 13 #include "chrome/common/instant_types.h"
14 #include "chrome/common/ntp_logging_events.h" 14 #include "chrome/common/ntp_logging_events.h"
15 #include "chrome/common/omnibox_focus_state.h" 15 #include "chrome/common/omnibox_focus_state.h"
16 #include "content/public/renderer/render_view_observer.h" 16 #include "content/public/renderer/render_view_observer.h"
17 #include "content/public/renderer/render_view_observer_tracker.h" 17 #include "content/public/renderer/render_view_observer_tracker.h"
18 #include "ui/base/window_open_disposition.h" 18 #include "ui/base/window_open_disposition.h"
19 #include "url/gurl.h" 19 #include "url/gurl.h"
20 20
21 namespace content { 21 namespace content {
22 class RenderView; 22 class RenderView;
23 } 23 }
24 24
25 class SearchBox : public content::RenderViewObserver, 25 class SearchBox : public content::RenderViewObserver,
26 public content::RenderViewObserverTracker<SearchBox> { 26 public content::RenderViewObserverTracker<SearchBox> {
27 public: 27 public:
28 explicit SearchBox(content::RenderView* render_view); 28 explicit SearchBox(content::RenderView* render_view);
29 virtual ~SearchBox(); 29 ~SearchBox() override;
30 30
31 // Sends ChromeViewHostMsg_LogEvent to the browser. 31 // Sends ChromeViewHostMsg_LogEvent to the browser.
32 void LogEvent(NTPLoggingEventType event); 32 void LogEvent(NTPLoggingEventType event);
33 33
34 // Sends ChromeViewHostMsg_LogMostVisitedImpression to the browser. 34 // Sends ChromeViewHostMsg_LogMostVisitedImpression to the browser.
35 void LogMostVisitedImpression(int position, const base::string16& provider); 35 void LogMostVisitedImpression(int position, const base::string16& provider);
36 36
37 // Sends ChromeViewHostMsg_LogMostVisitedNavigation to the browser. 37 // Sends ChromeViewHostMsg_LogMostVisitedNavigation to the browser.
38 void LogMostVisitedNavigation(int position, const base::string16& provider); 38 void LogMostVisitedNavigation(int position, const base::string16& provider);
39 39
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 bool is_focused() const { return is_focused_; } 107 bool is_focused() const { return is_focused_; }
108 bool is_input_in_progress() const { return is_input_in_progress_; } 108 bool is_input_in_progress() const { return is_input_in_progress_; }
109 bool is_key_capture_enabled() const { return is_key_capture_enabled_; } 109 bool is_key_capture_enabled() const { return is_key_capture_enabled_; }
110 bool display_instant_results() const { return display_instant_results_; } 110 bool display_instant_results() const { return display_instant_results_; }
111 const base::string16& query() const { return query_; } 111 const base::string16& query() const { return query_; }
112 int start_margin() const { return start_margin_; } 112 int start_margin() const { return start_margin_; }
113 const InstantSuggestion& suggestion() const { return suggestion_; } 113 const InstantSuggestion& suggestion() const { return suggestion_; }
114 114
115 private: 115 private:
116 // Overridden from content::RenderViewObserver: 116 // Overridden from content::RenderViewObserver:
117 virtual bool OnMessageReceived(const IPC::Message& message) override; 117 bool OnMessageReceived(const IPC::Message& message) override;
118 118
119 void OnSetPageSequenceNumber(int page_seq_no); 119 void OnSetPageSequenceNumber(int page_seq_no);
120 void OnChromeIdentityCheckResult(const base::string16& identity, 120 void OnChromeIdentityCheckResult(const base::string16& identity,
121 bool identity_match); 121 bool identity_match);
122 void OnDetermineIfPageSupportsInstant(); 122 void OnDetermineIfPageSupportsInstant();
123 void OnFocusChanged(OmniboxFocusState new_focus_state, 123 void OnFocusChanged(OmniboxFocusState new_focus_state,
124 OmniboxFocusChangeReason reason); 124 OmniboxFocusChangeReason reason);
125 void OnMarginChange(int margin); 125 void OnMarginChange(int margin);
126 void OnMostVisitedChanged( 126 void OnMostVisitedChanged(
127 const std::vector<InstantMostVisitedItem>& items); 127 const std::vector<InstantMostVisitedItem>& items);
(...skipping 23 matching lines...) Expand all
151 InstantRestrictedIDCache<InstantMostVisitedItem> most_visited_items_cache_; 151 InstantRestrictedIDCache<InstantMostVisitedItem> most_visited_items_cache_;
152 ThemeBackgroundInfo theme_info_; 152 ThemeBackgroundInfo theme_info_;
153 base::string16 query_; 153 base::string16 query_;
154 int start_margin_; 154 int start_margin_;
155 InstantSuggestion suggestion_; 155 InstantSuggestion suggestion_;
156 156
157 DISALLOW_COPY_AND_ASSIGN(SearchBox); 157 DISALLOW_COPY_AND_ASSIGN(SearchBox);
158 }; 158 };
159 159
160 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ 160 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_
OLDNEW
« no previous file with comments | « chrome/renderer/searchbox/search_bouncer.h ('k') | chrome/renderer/searchbox/searchbox_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698