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

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

Issue 159303: Implement location only display mode (used by popup windows). (Closed)
Patch Set: fix crash Created 11 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 24 matching lines...) Expand all
35 35
36 // Work in integers to match the gint GTK APIs. 36 // Work in integers to match the gint GTK APIs.
37 int cp_min; // For a selection: Represents the start. 37 int cp_min; // For a selection: Represents the start.
38 int cp_max; // For a selection: Represents the end (insert position). 38 int cp_max; // For a selection: Represents the end (insert position).
39 }; 39 };
40 40
41 AutocompleteEditViewGtk(AutocompleteEditController* controller, 41 AutocompleteEditViewGtk(AutocompleteEditController* controller,
42 ToolbarModel* toolbar_model, 42 ToolbarModel* toolbar_model,
43 Profile* profile, 43 Profile* profile,
44 CommandUpdater* command_updater, 44 CommandUpdater* command_updater,
45 bool popup_window_mode,
45 AutocompletePopupPositioner* popup_positioner); 46 AutocompletePopupPositioner* popup_positioner);
46 ~AutocompleteEditViewGtk(); 47 ~AutocompleteEditViewGtk();
47 48
48 // Initialize, create the underlying widgets, etc. 49 // Initialize, create the underlying widgets, etc.
49 void Init(); 50 void Init();
50 51
51 GtkWidget* widget() { return alignment_.get(); } 52 GtkWidget* widget() { return alignment_.get(); }
52 53
53 // Grab keyboard input focus, putting focus on the location widget. 54 // Grab keyboard input focus, putting focus on the location widget.
54 void SetFocus(); 55 void SetFocus();
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 scoped_ptr<AutocompleteEditModel> model_; 274 scoped_ptr<AutocompleteEditModel> model_;
274 scoped_ptr<AutocompletePopupViewGtk> popup_view_; 275 scoped_ptr<AutocompletePopupViewGtk> popup_view_;
275 AutocompleteEditController* controller_; 276 AutocompleteEditController* controller_;
276 ToolbarModel* toolbar_model_; 277 ToolbarModel* toolbar_model_;
277 278
278 // The object that handles additional command functionality exposed on the 279 // The object that handles additional command functionality exposed on the
279 // edit, such as invoking the keyword editor. 280 // edit, such as invoking the keyword editor.
280 CommandUpdater* command_updater_; 281 CommandUpdater* command_updater_;
281 282
282 // When true, the location bar view is read only and also is has a slightly 283 // When true, the location bar view is read only and also is has a slightly
283 // different presentation (font size / color). This is used for popups. 284 // different presentation (smaller font size). This is used for popups.
284 // TODO(deanm).
285 bool popup_window_mode_; 285 bool popup_window_mode_;
286 286
287 ToolbarModel::SecurityLevel scheme_security_level_; 287 ToolbarModel::SecurityLevel scheme_security_level_;
288 288
289 // Tracking state before and after a possible change. 289 // Tracking state before and after a possible change.
290 std::wstring text_before_change_; 290 std::wstring text_before_change_;
291 CharRange sel_before_change_; 291 CharRange sel_before_change_;
292 292
293 // The most-recently-selected text from the entry. This is updated on-the-fly 293 // The most-recently-selected text from the entry. This is updated on-the-fly
294 // as the user selects text. It is used in cases where we need to make the 294 // as the user selects text. It is used in cases where we need to make the
(...skipping 19 matching lines...) Expand all
314 314
315 // Was the text view already focused before the user clicked in it? We use 315 // Was the text view already focused before the user clicked in it? We use
316 // this to figure out whether we should select all of the text when the button 316 // this to figure out whether we should select all of the text when the button
317 // is released (we only do so if the view was initially unfocused). 317 // is released (we only do so if the view was initially unfocused).
318 bool text_view_focused_before_button_press_; 318 bool text_view_focused_before_button_press_;
319 319
320 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewGtk); 320 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewGtk);
321 }; 321 };
322 322
323 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_ 323 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698