| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 64 |
| 65 // Sets the colors of the text view according to the theme. | 65 // Sets the colors of the text view according to the theme. |
| 66 void SetBaseColor(); | 66 void SetBaseColor(); |
| 67 | 67 |
| 68 // Called after key even is handled either by HandleKeyEvent or by Textfield. | 68 // Called after key even is handled either by HandleKeyEvent or by Textfield. |
| 69 bool HandleAfterKeyEvent(const views::KeyEvent& event, bool handled); | 69 bool HandleAfterKeyEvent(const views::KeyEvent& event, bool handled); |
| 70 | 70 |
| 71 // Called when KeyRelease event is generated on textfield. | 71 // Called when KeyRelease event is generated on textfield. |
| 72 bool HandleKeyReleaseEvent(const views::KeyEvent& event); | 72 bool HandleKeyReleaseEvent(const views::KeyEvent& event); |
| 73 | 73 |
| 74 // Called when the mouse press event is generated on textfield. | 74 // Called when mouse events are generated on the textfield. |
| 75 bool HandleMousePressEvent(const views::MouseEvent& event); | 75 // The views::Textfield implementations will be executed first. |
| 76 void HandleMousePressEvent(const views::MouseEvent& event); |
| 77 void HandleMouseDragEvent(const views::MouseEvent& event); |
| 78 void HandleMouseReleaseEvent(const views::MouseEvent& event); |
| 76 | 79 |
| 77 // Called when Focus is set/unset on textfield. | 80 // Called when Focus is set/unset on textfield. |
| 78 void HandleFocusIn(); | 81 void HandleFocusIn(); |
| 79 void HandleFocusOut(); | 82 void HandleFocusOut(); |
| 80 | 83 |
| 81 // Sets whether the location entry can accept focus. | 84 // Sets whether the location entry can accept focus. |
| 82 void SetLocationEntryFocusable(bool focusable); | 85 void SetLocationEntryFocusable(bool focusable); |
| 83 | 86 |
| 84 // Returns true if the location entry is focusable and visible in | 87 // Returns true if the location entry is focusable and visible in |
| 85 // the root view. | 88 // the root view. |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 | 211 |
| 209 // Was the delete key pressed with an empty selection at the end of the edit? | 212 // Was the delete key pressed with an empty selection at the end of the edit? |
| 210 bool delete_at_end_pressed_; | 213 bool delete_at_end_pressed_; |
| 211 LocationBarView* location_bar_view_; | 214 LocationBarView* location_bar_view_; |
| 212 | 215 |
| 213 // True if the IME candidate window is open. When this is true, we want to | 216 // True if the IME candidate window is open. When this is true, we want to |
| 214 // avoid showing the popup. So far, the candidate window is detected only | 217 // avoid showing the popup. So far, the candidate window is detected only |
| 215 // on Chrome OS. | 218 // on Chrome OS. |
| 216 bool ime_candidate_window_open_; | 219 bool ime_candidate_window_open_; |
| 217 | 220 |
| 221 // Should we select all the text when we see the mouse button get released? |
| 222 // We select in response to a click that focuses the omnibox, but we defer |
| 223 // until release, setting this variable back to false if we saw a drag, to |
| 224 // allow the user to select just a portion of the text. |
| 225 bool select_all_on_mouse_release_; |
| 226 |
| 218 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews); | 227 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews); |
| 219 }; | 228 }; |
| 220 | 229 |
| 221 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ | 230 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ |
| OLD | NEW |