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

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

Issue 1056002: Omnibox M5 work, part 1: Security changes... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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) 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 ToolbarModel* toolbar_model, 51 ToolbarModel* toolbar_model,
52 Profile* profile, 52 Profile* profile,
53 CommandUpdater* command_updater, 53 CommandUpdater* command_updater,
54 bool popup_window_mode, 54 bool popup_window_mode,
55 const BubblePositioner* bubble_positioner); 55 const BubblePositioner* bubble_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(); }
62
63 // Returns the width, in pixels, needed to display the current text. The 61 // Returns the width, in pixels, needed to display the current text. The
64 // returned value includes margins and borders. 62 // returned value includes margins and borders.
65 int TextWidth(); 63 int TextWidth();
66 64
67 // Implement the AutocompleteEditView interface. 65 // Implement the AutocompleteEditView interface.
68 virtual AutocompleteEditModel* model() { return model_.get(); } 66 virtual AutocompleteEditModel* model() { return model_.get(); }
69 virtual const AutocompleteEditModel* model() const { return model_.get(); } 67 virtual const AutocompleteEditModel* model() const { return model_.get(); }
70 68
71 virtual void SaveStateToTab(TabContents* tab); 69 virtual void SaveStateToTab(TabContents* tab);
72 70
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 // The widget we expose, used for vertically centering the real text edit, 370 // The widget we expose, used for vertically centering the real text edit,
373 // since the height will change based on the font / font size, etc. 371 // since the height will change based on the font / font size, etc.
374 OwnedWidgetGtk alignment_; 372 OwnedWidgetGtk alignment_;
375 373
376 // The actual text entry which will be owned by the alignment_. 374 // The actual text entry which will be owned by the alignment_.
377 GtkWidget* text_view_; 375 GtkWidget* text_view_;
378 376
379 GtkTextTagTable* tag_table_; 377 GtkTextTagTable* tag_table_;
380 GtkTextBuffer* text_buffer_; 378 GtkTextBuffer* text_buffer_;
381 GtkTextTag* faded_text_tag_; 379 GtkTextTag* faded_text_tag_;
380 GtkTextTag* ev_secure_scheme_tag_;
382 GtkTextTag* secure_scheme_tag_; 381 GtkTextTag* secure_scheme_tag_;
383 GtkTextTag* insecure_scheme_tag_; 382 GtkTextTag* security_error_scheme_tag_;
384 GtkTextTag* normal_text_tag_; 383 GtkTextTag* normal_text_tag_;
385 384
386 scoped_ptr<AutocompleteEditModel> model_; 385 scoped_ptr<AutocompleteEditModel> model_;
387 scoped_ptr<AutocompletePopupView> popup_view_; 386 scoped_ptr<AutocompletePopupView> popup_view_;
388 AutocompleteEditController* controller_; 387 AutocompleteEditController* controller_;
389 ToolbarModel* toolbar_model_; 388 ToolbarModel* toolbar_model_;
390 389
391 // The object that handles additional command functionality exposed on the 390 // The object that handles additional command functionality exposed on the
392 // edit, such as invoking the keyword editor. 391 // edit, such as invoking the keyword editor.
393 CommandUpdater* command_updater_; 392 CommandUpdater* command_updater_;
394 393
395 // When true, the location bar view is read only and also is has a slightly 394 // When true, the location bar view is read only and also is has a slightly
396 // different presentation (smaller font size). This is used for popups. 395 // different presentation (smaller font size). This is used for popups.
397 bool popup_window_mode_; 396 bool popup_window_mode_;
398 397
399 ToolbarModel::SecurityLevel scheme_security_level_; 398 ToolbarModel::SecurityLevel security_level_;
400 399
401 // Selection at the point where the user started using the 400 // Selection at the point where the user started using the
402 // arrows to move around in the popup. 401 // arrows to move around in the popup.
403 CharRange saved_temporary_selection_; 402 CharRange saved_temporary_selection_;
404 403
405 // Tracking state before and after a possible change. 404 // Tracking state before and after a possible change.
406 std::wstring text_before_change_; 405 std::wstring text_before_change_;
407 CharRange sel_before_change_; 406 CharRange sel_before_change_;
408 407
409 // The most-recently-selected text from the entry. This is updated on-the-fly 408 // The most-recently-selected text from the entry. This is updated on-the-fly
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 478
480 // Indicate if the tab to search should be enabled or not. It's true by 479 // Indicate if the tab to search should be enabled or not. It's true by
481 // default and will only be set to false if the location bar view is not able 480 // default and will only be set to false if the location bar view is not able
482 // to show the tab to search hint. 481 // to show the tab to search hint.
483 bool enable_tab_to_search_; 482 bool enable_tab_to_search_;
484 483
485 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewGtk); 484 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewGtk);
486 }; 485 };
487 486
488 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_ 487 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_
OLDNEW
« no previous file with comments | « chrome/app/theme/theme_resources.grd ('k') | chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698