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

Side by Side Diff: chrome/browser/ui/views/omnibox/omnibox_view_views.h

Issue 7584024: views omnibox popup: Setup the parent Widget, instead of the parent NativeView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 29 matching lines...) Expand all
40 public views::TextfieldController { 40 public views::TextfieldController {
41 public: 41 public:
42 // The internal view class name. 42 // The internal view class name.
43 static const char kViewClassName[]; 43 static const char kViewClassName[];
44 44
45 OmniboxViewViews(AutocompleteEditController* controller, 45 OmniboxViewViews(AutocompleteEditController* controller,
46 ToolbarModel* toolbar_model, 46 ToolbarModel* toolbar_model,
47 Profile* profile, 47 Profile* profile,
48 CommandUpdater* command_updater, 48 CommandUpdater* command_updater,
49 bool popup_window_mode, 49 bool popup_window_mode,
50 const views::View* location_bar); 50 views::View* location_bar);
51 virtual ~OmniboxViewViews(); 51 virtual ~OmniboxViewViews();
52 52
53 // Initialize, create the underlying views, etc; 53 // Initialize, create the underlying views, etc;
54 void Init(); 54 void Init();
55 55
56 // Sets the colors of the text view according to the theme. 56 // Sets the colors of the text view according to the theme.
57 void SetBaseColor(); 57 void SetBaseColor();
58 58
59 // Called after key even is handled either by HandleKeyEvent or by Textfield. 59 // Called after key even is handled either by HandleKeyEvent or by Textfield.
60 bool HandleAfterKeyEvent(const views::KeyEvent& event, bool handled); 60 bool HandleAfterKeyEvent(const views::KeyEvent& event, bool handled);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 void SetTextAndSelectedRange(const string16& text, 150 void SetTextAndSelectedRange(const string16& text,
151 const ui::Range& range); 151 const ui::Range& range);
152 152
153 // Returns the selected text. 153 // Returns the selected text.
154 string16 GetSelectedText() const; 154 string16 GetSelectedText() const;
155 155
156 // Selects the text given by |caret| and |end|. 156 // Selects the text given by |caret| and |end|.
157 void SelectRange(size_t caret, size_t end); 157 void SelectRange(size_t caret, size_t end);
158 158
159 AutocompletePopupView* CreatePopupView(Profile* profile, 159 AutocompletePopupView* CreatePopupView(Profile* profile,
160 const View* location_bar); 160 View* location_bar);
161 161
162 views::Textfield* textfield_; 162 views::Textfield* textfield_;
163 163
164 scoped_ptr<AutocompleteEditModel> model_; 164 scoped_ptr<AutocompleteEditModel> model_;
165 scoped_ptr<AutocompletePopupView> popup_view_; 165 scoped_ptr<AutocompletePopupView> popup_view_;
166 AutocompleteEditController* controller_; 166 AutocompleteEditController* controller_;
167 ToolbarModel* toolbar_model_; 167 ToolbarModel* toolbar_model_;
168 168
169 // The object that handles additional command functionality exposed on the 169 // The object that handles additional command functionality exposed on the
170 // edit, such as invoking the keyword editor. 170 // edit, such as invoking the keyword editor.
(...skipping 14 matching lines...) Expand all
185 ui::Range sel_before_change_; 185 ui::Range sel_before_change_;
186 bool ime_composing_before_change_; 186 bool ime_composing_before_change_;
187 187
188 // Was the delete key pressed with an empty selection at the end of the edit? 188 // Was the delete key pressed with an empty selection at the end of the edit?
189 bool delete_at_end_pressed_; 189 bool delete_at_end_pressed_;
190 190
191 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews); 191 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews);
192 }; 192 };
193 193
194 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ 194 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698