| 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_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ |
| 6 #define CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ | 6 #define CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 // Caret visibility is tracked per-tab and updates automatically upon | 268 // Caret visibility is tracked per-tab and updates automatically upon |
| 269 // switching tabs. | 269 // switching tabs. |
| 270 void SetCaretVisibility(bool visible); | 270 void SetCaretVisibility(bool visible); |
| 271 | 271 |
| 272 // Sent before |OnKillFocus| and before the popup is closed. | 272 // Sent before |OnKillFocus| and before the popup is closed. |
| 273 void OnWillKillFocus(); | 273 void OnWillKillFocus(); |
| 274 | 274 |
| 275 // Called when the view is losing focus. Resets some state. | 275 // Called when the view is losing focus. Resets some state. |
| 276 void OnKillFocus(); | 276 void OnKillFocus(); |
| 277 | 277 |
| 278 // Returns whether the omnibox will handle a press of the escape key. The |
| 279 // caller can use this to decide whether the browser should process escape as |
| 280 // "stop current page load". |
| 281 bool WillHandleEscapeKey() const; |
| 282 |
| 278 // Called when the user presses the escape key. Decides what, if anything, to | 283 // Called when the user presses the escape key. Decides what, if anything, to |
| 279 // revert about any current edits. Returns whether the key was handled. | 284 // revert about any current edits. Returns whether the key was handled. |
| 280 bool OnEscapeKeyPressed(); | 285 bool OnEscapeKeyPressed(); |
| 281 | 286 |
| 282 // Called when the user presses or releases the control key. Changes state as | 287 // Called when the user presses or releases the control key. Changes state as |
| 283 // necessary. | 288 // necessary. |
| 284 void OnControlKeyChanged(bool pressed); | 289 void OnControlKeyChanged(bool pressed); |
| 285 | 290 |
| 286 // Called when the user pastes in text. | 291 // Called when the user pastes in text. |
| 287 void OnPaste(); | 292 void OnPaste(); |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 | 561 |
| 557 // The input that was sent to the AutocompleteController. Since no | 562 // The input that was sent to the AutocompleteController. Since no |
| 558 // autocomplete query is started after a tab switch, it is possible for this | 563 // autocomplete query is started after a tab switch, it is possible for this |
| 559 // |input_| to differ from the one currently stored in AutocompleteController. | 564 // |input_| to differ from the one currently stored in AutocompleteController. |
| 560 AutocompleteInput input_; | 565 AutocompleteInput input_; |
| 561 | 566 |
| 562 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel); | 567 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel); |
| 563 }; | 568 }; |
| 564 | 569 |
| 565 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ | 570 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ |
| OLD | NEW |