OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 void HandleFocusIn(); | 78 void HandleFocusIn(); |
79 void HandleFocusOut(); | 79 void HandleFocusOut(); |
80 | 80 |
81 // Sets whether the location entry can accept focus. | 81 // Sets whether the location entry can accept focus. |
82 void SetLocationEntryFocusable(bool focusable); | 82 void SetLocationEntryFocusable(bool focusable); |
83 | 83 |
84 // Returns true if the location entry is focusable and visible in | 84 // Returns true if the location entry is focusable and visible in |
85 // the root view. | 85 // the root view. |
86 bool IsLocationEntryFocusableInRootView() const; | 86 bool IsLocationEntryFocusableInRootView() const; |
87 | 87 |
88 // Executes the given command on the text field. | |
89 void ExecuteCommandOnTextField(int command_id); | |
90 | |
91 // Implements views::View | 88 // Implements views::View |
92 virtual void Layout() OVERRIDE; | 89 virtual void Layout() OVERRIDE; |
93 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 90 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
94 virtual std::string GetClassName() const OVERRIDE; | 91 virtual std::string GetClassName() const OVERRIDE; |
95 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; | 92 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; |
96 | 93 |
97 // OmniboxView: | 94 // OmniboxView: |
98 virtual void SaveStateToTab(content::WebContents* tab) OVERRIDE; | 95 virtual void SaveStateToTab(content::WebContents* tab) OVERRIDE; |
99 virtual void Update( | 96 virtual void Update( |
100 const content::WebContents* tab_for_state_restoring) OVERRIDE; | 97 const content::WebContents* tab_for_state_restoring) OVERRIDE; |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 // Should we select all the text when we see the mouse button get released? | 216 // Should we select all the text when we see the mouse button get released? |
220 // We select in response to a click that focuses the omnibox, but we defer | 217 // We select in response to a click that focuses the omnibox, but we defer |
221 // until release, setting this variable back to false if we saw a drag, to | 218 // until release, setting this variable back to false if we saw a drag, to |
222 // allow the user to select just a portion of the text. | 219 // allow the user to select just a portion of the text. |
223 bool select_all_on_mouse_release_; | 220 bool select_all_on_mouse_release_; |
224 | 221 |
225 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews); | 222 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews); |
226 }; | 223 }; |
227 | 224 |
228 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ | 225 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ |
OLD | NEW |