| OLD | NEW |
| 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" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 | 111 |
| 112 private: | 112 private: |
| 113 // Overridden from content::RenderViewObserver: | 113 // Overridden from content::RenderViewObserver: |
| 114 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 114 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 115 | 115 |
| 116 void OnChromeIdentityCheckResult(const base::string16& identity, | 116 void OnChromeIdentityCheckResult(const base::string16& identity, |
| 117 bool identity_match); | 117 bool identity_match); |
| 118 void OnDetermineIfPageSupportsInstant(); | 118 void OnDetermineIfPageSupportsInstant(); |
| 119 void OnFocusChanged(OmniboxFocusState new_focus_state, | 119 void OnFocusChanged(OmniboxFocusState new_focus_state, |
| 120 OmniboxFocusChangeReason reason); | 120 OmniboxFocusChangeReason reason); |
| 121 void OnMarginChange(int margin, int width); | 121 void OnMarginChange(int margin); |
| 122 void OnMostVisitedChanged( | 122 void OnMostVisitedChanged( |
| 123 const std::vector<InstantMostVisitedItem>& items); | 123 const std::vector<InstantMostVisitedItem>& items); |
| 124 void OnPromoInformationReceived(bool is_app_launcher_enabled); | 124 void OnPromoInformationReceived(bool is_app_launcher_enabled); |
| 125 void OnSetDisplayInstantResults(bool display_instant_results); | 125 void OnSetDisplayInstantResults(bool display_instant_results); |
| 126 void OnSetInputInProgress(bool input_in_progress); | 126 void OnSetInputInProgress(bool input_in_progress); |
| 127 void OnSetSuggestionToPrefetch(const InstantSuggestion& suggestion); | 127 void OnSetSuggestionToPrefetch(const InstantSuggestion& suggestion); |
| 128 void OnSubmit(const base::string16& query); | 128 void OnSubmit(const base::string16& query); |
| 129 void OnThemeChanged(const ThemeBackgroundInfo& theme_info); | 129 void OnThemeChanged(const ThemeBackgroundInfo& theme_info); |
| 130 void OnToggleVoiceSearch(); | 130 void OnToggleVoiceSearch(); |
| 131 | 131 |
| 132 // Returns the current zoom factor of the render view or 1 on failure. | 132 // Returns the current zoom factor of the render view or 1 on failure. |
| 133 double GetZoom() const; | 133 double GetZoom() const; |
| 134 | 134 |
| 135 // Sets the searchbox values to their initial value. | 135 // Sets the searchbox values to their initial value. |
| 136 void Reset(); | 136 void Reset(); |
| 137 | 137 |
| 138 // Returns the URL of the Most Visited item specified by the |item_id|. | 138 // Returns the URL of the Most Visited item specified by the |item_id|. |
| 139 GURL GetURLForMostVisitedItem(InstantRestrictedID item_id) const; | 139 GURL GetURLForMostVisitedItem(InstantRestrictedID item_id) const; |
| 140 | 140 |
| 141 bool app_launcher_enabled_; | 141 bool app_launcher_enabled_; |
| 142 bool is_focused_; | 142 bool is_focused_; |
| 143 bool is_input_in_progress_; | 143 bool is_input_in_progress_; |
| 144 bool is_key_capture_enabled_; | 144 bool is_key_capture_enabled_; |
| 145 bool display_instant_results_; | 145 bool display_instant_results_; |
| 146 InstantRestrictedIDCache<InstantMostVisitedItem> most_visited_items_cache_; | 146 InstantRestrictedIDCache<InstantMostVisitedItem> most_visited_items_cache_; |
| 147 ThemeBackgroundInfo theme_info_; | 147 ThemeBackgroundInfo theme_info_; |
| 148 base::string16 query_; | 148 base::string16 query_; |
| 149 int start_margin_; | 149 int start_margin_; |
| 150 InstantSuggestion suggestion_; | 150 InstantSuggestion suggestion_; |
| 151 int width_; | |
| 152 | 151 |
| 153 DISALLOW_COPY_AND_ASSIGN(SearchBox); | 152 DISALLOW_COPY_AND_ASSIGN(SearchBox); |
| 154 }; | 153 }; |
| 155 | 154 |
| 156 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ | 155 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ |
| OLD | NEW |