Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: chrome/browser/autocomplete/autocomplete_edit_view_gtk.h

Issue 194041: Making the focus remembering across tab switch work. (Closed)
Patch Set: Fix for conflicts Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_ 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_
6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_ 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_
7 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 CommandUpdater* command_updater, 53 CommandUpdater* command_updater,
54 bool popup_window_mode, 54 bool popup_window_mode,
55 AutocompletePopupPositioner* popup_positioner); 55 AutocompletePopupPositioner* popup_positioner);
56 ~AutocompleteEditViewGtk(); 56 ~AutocompleteEditViewGtk();
57 57
58 // Initialize, create the underlying widgets, etc. 58 // Initialize, create the underlying widgets, etc.
59 void Init(); 59 void Init();
60 60
61 GtkWidget* widget() { return alignment_.get(); } 61 GtkWidget* widget() { return alignment_.get(); }
62 62
63 // Grab keyboard input focus, putting focus on the location widget.
64 void SetFocus();
65
66 // Returns the width, in pixels, needed to display the current text. The 63 // Returns the width, in pixels, needed to display the current text. The
67 // returned value includes margins and borders. 64 // returned value includes margins and borders.
68 int TextWidth(); 65 int TextWidth();
69 66
70 // Implement the AutocompleteEditView interface. 67 // Implement the AutocompleteEditView interface.
71 virtual AutocompleteEditModel* model() { return model_.get(); } 68 virtual AutocompleteEditModel* model() { return model_.get(); }
72 virtual const AutocompleteEditModel* model() const { return model_.get(); } 69 virtual const AutocompleteEditModel* model() const { return model_.get(); }
73 70
74 virtual void SaveStateToTab(TabContents* tab); 71 virtual void SaveStateToTab(TabContents* tab);
75 72
(...skipping 20 matching lines...) Expand all
96 93
97 virtual void SetForcedQuery(); 94 virtual void SetForcedQuery();
98 95
99 virtual bool IsSelectAll(); 96 virtual bool IsSelectAll();
100 virtual void SelectAll(bool reversed); 97 virtual void SelectAll(bool reversed);
101 virtual void RevertAll(); 98 virtual void RevertAll();
102 99
103 virtual void UpdatePopup(); 100 virtual void UpdatePopup();
104 virtual void ClosePopup(); 101 virtual void ClosePopup();
105 102
103 virtual void SetFocus();
104
106 virtual void OnTemporaryTextMaybeChanged(const std::wstring& display_text, 105 virtual void OnTemporaryTextMaybeChanged(const std::wstring& display_text,
107 bool save_original_selection); 106 bool save_original_selection);
108 virtual bool OnInlineAutocompleteTextMaybeChanged( 107 virtual bool OnInlineAutocompleteTextMaybeChanged(
109 const std::wstring& display_text, size_t user_text_length); 108 const std::wstring& display_text, size_t user_text_length);
110 virtual void OnRevertTemporaryText(); 109 virtual void OnRevertTemporaryText();
111 virtual void OnBeforePossibleChange(); 110 virtual void OnBeforePossibleChange();
112 virtual bool OnAfterPossibleChange(); 111 virtual bool OnAfterPossibleChange();
113 virtual gfx::NativeView GetNativeView() const; 112 virtual gfx::NativeView GetNativeView() const;
114 113
115 // Overridden from NotificationObserver: 114 // Overridden from NotificationObserver:
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 410
412 // If a character is inserted, store it in this variable so that it can 411 // If a character is inserted, store it in this variable so that it can
413 // be used later in "key-press-event" signal handler to determine if a Tab or 412 // be used later in "key-press-event" signal handler to determine if a Tab or
414 // Enter key event is handled by IME or not. 413 // Enter key event is handled by IME or not.
415 char char_inserted_; 414 char char_inserted_;
416 415
417 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewGtk); 416 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewGtk);
418 }; 417 };
419 418
420 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_ 419 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_edit_view.h ('k') | chrome/browser/autocomplete/autocomplete_edit_view_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698