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_GTK_OMNIBOX_OMNIBOX_VIEW_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_OMNIBOX_OMNIBOX_VIEW_GTK_H_ |
6 #define CHROME_BROWSER_UI_GTK_OMNIBOX_OMNIBOX_VIEW_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_OMNIBOX_OMNIBOX_VIEW_GTK_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
10 | 10 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 size_t index, | 99 size_t index, |
100 const string16& keyword) OVERRIDE; | 100 const string16& keyword) OVERRIDE; |
101 virtual string16 GetText() const OVERRIDE; | 101 virtual string16 GetText() const OVERRIDE; |
102 virtual bool IsEditingOrEmpty() const OVERRIDE; | 102 virtual bool IsEditingOrEmpty() const OVERRIDE; |
103 virtual int GetIcon() const OVERRIDE; | 103 virtual int GetIcon() const OVERRIDE; |
104 virtual void SetUserText(const string16& text) OVERRIDE; | 104 virtual void SetUserText(const string16& text) OVERRIDE; |
105 virtual void SetUserText(const string16& text, | 105 virtual void SetUserText(const string16& text, |
106 const string16& display_text, | 106 const string16& display_text, |
107 bool update_popup) OVERRIDE; | 107 bool update_popup) OVERRIDE; |
108 virtual void SetWindowTextAndCaretPos(const string16& text, | 108 virtual void SetWindowTextAndCaretPos(const string16& text, |
109 size_t caret_pos) OVERRIDE; | 109 size_t caret_pos, |
| 110 bool update_popup, |
| 111 bool notify_text_changed) OVERRIDE; |
110 virtual void SetForcedQuery() OVERRIDE; | 112 virtual void SetForcedQuery() OVERRIDE; |
111 virtual bool IsSelectAll() OVERRIDE; | 113 virtual bool IsSelectAll() OVERRIDE; |
112 virtual bool DeleteAtEndPressed() OVERRIDE; | 114 virtual bool DeleteAtEndPressed() OVERRIDE; |
113 virtual void GetSelectionBounds(string16::size_type* start, | 115 virtual void GetSelectionBounds(string16::size_type* start, |
114 string16::size_type* end) const OVERRIDE; | 116 string16::size_type* end) const OVERRIDE; |
115 virtual void SelectAll(bool reversed) OVERRIDE; | 117 virtual void SelectAll(bool reversed) OVERRIDE; |
116 virtual void RevertAll() OVERRIDE; | 118 virtual void RevertAll() OVERRIDE; |
117 virtual void UpdatePopup() OVERRIDE; | 119 virtual void UpdatePopup() OVERRIDE; |
118 virtual void ClosePopup() OVERRIDE; | 120 virtual void ClosePopup() OVERRIDE; |
119 virtual void SetFocus() OVERRIDE; | 121 virtual void SetFocus() OVERRIDE; |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 // during sync dispatch of "end-user-action" signal so that an unexpected | 456 // during sync dispatch of "end-user-action" signal so that an unexpected |
455 // change caused by the event can be ignored in OnAfterPossibleChange(). | 457 // change caused by the event can be ignored in OnAfterPossibleChange(). |
456 bool enter_was_pressed_; | 458 bool enter_was_pressed_; |
457 | 459 |
458 // Indicates if Tab key was pressed. | 460 // Indicates if Tab key was pressed. |
459 // | 461 // |
460 // It's only used in the key press handler to detect a Tab key press event | 462 // It's only used in the key press handler to detect a Tab key press event |
461 // during sync dispatch of "move-focus" signal. | 463 // during sync dispatch of "move-focus" signal. |
462 bool tab_was_pressed_; | 464 bool tab_was_pressed_; |
463 | 465 |
| 466 // Indicates if Shift key was pressed. |
| 467 // Used in conjunction with the Tab key to determine if either traversal |
| 468 // needs to move up the results or if the keyword needs to be cleared. |
| 469 bool shift_was_pressed_; |
| 470 |
464 // Indicates that user requested to paste clipboard. | 471 // Indicates that user requested to paste clipboard. |
465 // The actual paste clipboard action might be performed later if the | 472 // The actual paste clipboard action might be performed later if the |
466 // clipboard is not empty. | 473 // clipboard is not empty. |
467 bool paste_clipboard_requested_; | 474 bool paste_clipboard_requested_; |
468 | 475 |
469 // Indicates if an Enter key press is inserted as text. | 476 // Indicates if an Enter key press is inserted as text. |
470 // It's used in the key press handler to determine if an Enter key event is | 477 // It's used in the key press handler to determine if an Enter key event is |
471 // handled by IME or not. | 478 // handled by IME or not. |
472 bool enter_was_inserted_; | 479 bool enter_was_inserted_; |
473 | 480 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 // The view that is going to be focused next. Only valid while handling | 527 // The view that is going to be focused next. Only valid while handling |
521 // "focus-out" events. | 528 // "focus-out" events. |
522 GtkWidget* going_to_focus_; | 529 GtkWidget* going_to_focus_; |
523 | 530 |
524 ui::GtkSignalRegistrar signals_; | 531 ui::GtkSignalRegistrar signals_; |
525 | 532 |
526 DISALLOW_COPY_AND_ASSIGN(OmniboxViewGtk); | 533 DISALLOW_COPY_AND_ASSIGN(OmniboxViewGtk); |
527 }; | 534 }; |
528 | 535 |
529 #endif // CHROME_BROWSER_UI_GTK_OMNIBOX_OMNIBOX_VIEW_GTK_H_ | 536 #endif // CHROME_BROWSER_UI_GTK_OMNIBOX_OMNIBOX_VIEW_GTK_H_ |
OLD | NEW |