diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-31 20:27:23 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-31 20:27:23 +0000 |
commit | 682ebcf4e0b75969bfa55f9ff9ce08b3650d7f69 (patch) | |
tree | c051829e5431c88d9175586d291d05dc40df4baf /chrome/browser/autocomplete/autocomplete_edit_view_gtk.h | |
parent | f9358382509f917e508c7fd910ef2cc49d7671fc (diff) | |
download | chromium_src-682ebcf4e0b75969bfa55f9ff9ce08b3650d7f69.zip chromium_src-682ebcf4e0b75969bfa55f9ff9ce08b3650d7f69.tar.gz chromium_src-682ebcf4e0b75969bfa55f9ff9ce08b3650d7f69.tar.bz2 |
Relanding r22155 (GTK Themes: Use theme colors in the text view in the location bar.)
Fixed build issues with Ben's help.
Original Review URL: http://codereview.chromium.org/159671
Review URL: http://codereview.chromium.org/160466
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22181 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/autocomplete_edit_view_gtk.h')
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_edit_view_gtk.h | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h index bd91442..667c756 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h +++ b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h @@ -12,6 +12,8 @@ #include "base/string_util.h" #include "chrome/browser/autocomplete/autocomplete_edit_view.h" #include "chrome/browser/toolbar_model.h" +#include "chrome/common/notification_observer.h" +#include "chrome/common/notification_registrar.h" #include "chrome/common/owned_widget_gtk.h" #include "chrome/common/page_transition_types.h" #include "webkit/glue/window_open_disposition.h" @@ -24,7 +26,12 @@ class CommandUpdater; class Profile; class TabContents; -class AutocompleteEditViewGtk : public AutocompleteEditView { +#if !defined(TOOLKIT_VIEWS) +class GtkThemeProvider; +#endif + +class AutocompleteEditViewGtk : public AutocompleteEditView, + public NotificationObserver { public: // Modeled like the Windows CHARRANGE. Represent a pair of cursor position // offsets. Since GtkTextIters are invalid after the buffer is changed, we @@ -99,6 +106,13 @@ class AutocompleteEditViewGtk : public AutocompleteEditView { virtual bool OnAfterPossibleChange(); virtual gfx::NativeView GetNativeView() const; + // Overridden from NotificationObserver: + virtual void Observe(NotificationType type, + const NotificationSource& source, + const NotificationDetails& details); + + void SetBaseColor(); + private: // TODO(deanm): Would be nice to insulate the thunkers better, etc. static void HandleBeginUserActionThunk(GtkTextBuffer* unused, gpointer self) { @@ -282,10 +296,10 @@ class AutocompleteEditViewGtk : public AutocompleteEditView { GtkTextTagTable* tag_table_; GtkTextBuffer* text_buffer_; - GtkTextTag* base_tag_; + GtkTextTag* faded_text_tag_; GtkTextTag* secure_scheme_tag_; GtkTextTag* insecure_scheme_tag_; - GtkTextTag* black_text_tag_; + GtkTextTag* normal_text_tag_; scoped_ptr<AutocompleteEditModel> model_; scoped_ptr<AutocompletePopupView> popup_view_; @@ -333,6 +347,13 @@ class AutocompleteEditViewGtk : public AutocompleteEditView { // is released (we only do so if the view was initially unfocused). bool text_view_focused_before_button_press_; +#if !defined(TOOLKIT_VIEWS) + // Supplies colors, et cetera. + GtkThemeProvider* theme_provider_; + + NotificationRegistrar registrar_; +#endif + DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewGtk); }; |