| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_GTK_LOCATION_BAR_VIEW_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_LOCATION_BAR_VIEW_GTK_H_ |
| 6 #define CHROME_BROWSER_UI_GTK_LOCATION_BAR_VIEW_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_LOCATION_BAR_VIEW_GTK_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
| 10 | 10 |
| 11 #include <map> | 11 #include <map> |
| 12 #include <string> | 12 #include <string> |
| 13 | 13 |
| 14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
| 15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
| 16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 17 #include "base/memory/scoped_vector.h" | 17 #include "base/memory/scoped_vector.h" |
| 18 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
| 19 #include "chrome/browser/command_updater.h" | 19 #include "chrome/browser/command_observer.h" |
| 20 #include "chrome/browser/extensions/extension_context_menu_model.h" | 20 #include "chrome/browser/extensions/extension_context_menu_model.h" |
| 21 #include "chrome/browser/extensions/image_loading_tracker.h" | 21 #include "chrome/browser/extensions/image_loading_tracker.h" |
| 22 #include "chrome/browser/prefs/pref_member.h" | 22 #include "chrome/browser/prefs/pref_member.h" |
| 23 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h" | 23 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h" |
| 24 #include "chrome/browser/ui/gtk/menu_gtk.h" | 24 #include "chrome/browser/ui/gtk/menu_gtk.h" |
| 25 #include "chrome/browser/ui/omnibox/location_bar.h" | 25 #include "chrome/browser/ui/omnibox/location_bar.h" |
| 26 #include "chrome/browser/ui/omnibox/omnibox_edit_controller.h" | 26 #include "chrome/browser/ui/omnibox/omnibox_edit_controller.h" |
| 27 #include "chrome/browser/ui/view_ids.h" | 27 #include "chrome/browser/ui/view_ids.h" |
| 28 #include "chrome/browser/ui/zoom/zoom_controller.h" | 28 #include "chrome/browser/ui/zoom/zoom_controller.h" |
| 29 #include "chrome/common/content_settings_types.h" | 29 #include "chrome/common/content_settings_types.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 54 } | 54 } |
| 55 | 55 |
| 56 namespace ui { | 56 namespace ui { |
| 57 class AcceleratorGtk; | 57 class AcceleratorGtk; |
| 58 } | 58 } |
| 59 | 59 |
| 60 class LocationBarViewGtk : public OmniboxEditController, | 60 class LocationBarViewGtk : public OmniboxEditController, |
| 61 public LocationBar, | 61 public LocationBar, |
| 62 public LocationBarTesting, | 62 public LocationBarTesting, |
| 63 public content::NotificationObserver, | 63 public content::NotificationObserver, |
| 64 public CommandUpdater::CommandObserver { | 64 public CommandObserver { |
| 65 public: | 65 public: |
| 66 explicit LocationBarViewGtk(Browser* browser); | 66 explicit LocationBarViewGtk(Browser* browser); |
| 67 virtual ~LocationBarViewGtk(); | 67 virtual ~LocationBarViewGtk(); |
| 68 | 68 |
| 69 void Init(bool popup_window_mode); | 69 void Init(bool popup_window_mode); |
| 70 | 70 |
| 71 // Returns the widget the caller should host. You must call Init() first. | 71 // Returns the widget the caller should host. You must call Init() first. |
| 72 GtkWidget* widget() { return hbox_.get(); } | 72 GtkWidget* widget() { return hbox_.get(); } |
| 73 | 73 |
| 74 // Returns the widget the page info bubble should point to. | 74 // Returns the widget the page info bubble should point to. |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 virtual int PageActionVisibleCount() OVERRIDE; | 156 virtual int PageActionVisibleCount() OVERRIDE; |
| 157 virtual ExtensionAction* GetPageAction(size_t index) OVERRIDE; | 157 virtual ExtensionAction* GetPageAction(size_t index) OVERRIDE; |
| 158 virtual ExtensionAction* GetVisiblePageAction(size_t index) OVERRIDE; | 158 virtual ExtensionAction* GetVisiblePageAction(size_t index) OVERRIDE; |
| 159 virtual void TestPageActionPressed(size_t index) OVERRIDE; | 159 virtual void TestPageActionPressed(size_t index) OVERRIDE; |
| 160 | 160 |
| 161 // content::NotificationObserver: | 161 // content::NotificationObserver: |
| 162 virtual void Observe(int type, | 162 virtual void Observe(int type, |
| 163 const content::NotificationSource& source, | 163 const content::NotificationSource& source, |
| 164 const content::NotificationDetails& details) OVERRIDE; | 164 const content::NotificationDetails& details) OVERRIDE; |
| 165 | 165 |
| 166 // CommandUpdater::CommandObserver: | 166 // CommandObserver: |
| 167 virtual void EnabledStateChangedForCommand(int id, bool enabled) OVERRIDE; | 167 virtual void EnabledStateChangedForCommand(int id, bool enabled) OVERRIDE; |
| 168 | 168 |
| 169 // Edit background color. | 169 // Edit background color. |
| 170 static const GdkColor kBackgroundColor; | 170 static const GdkColor kBackgroundColor; |
| 171 | 171 |
| 172 private: | 172 private: |
| 173 class ContentSettingImageViewGtk : public BubbleDelegateGtk, | 173 class ContentSettingImageViewGtk : public BubbleDelegateGtk, |
| 174 public ui::AnimationDelegate { | 174 public ui::AnimationDelegate { |
| 175 public: | 175 public: |
| 176 ContentSettingImageViewGtk(ContentSettingsType content_type, | 176 ContentSettingImageViewGtk(ContentSettingsType content_type, |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 // The last search keyword that was shown via the |tab_to_search_box_|. | 536 // The last search keyword that was shown via the |tab_to_search_box_|. |
| 537 string16 last_keyword_; | 537 string16 last_keyword_; |
| 538 | 538 |
| 539 // Used to change the visibility of the star decoration. | 539 // Used to change the visibility of the star decoration. |
| 540 BooleanPrefMember edit_bookmarks_enabled_; | 540 BooleanPrefMember edit_bookmarks_enabled_; |
| 541 | 541 |
| 542 DISALLOW_COPY_AND_ASSIGN(LocationBarViewGtk); | 542 DISALLOW_COPY_AND_ASSIGN(LocationBarViewGtk); |
| 543 }; | 543 }; |
| 544 | 544 |
| 545 #endif // CHROME_BROWSER_UI_GTK_LOCATION_BAR_VIEW_GTK_H_ | 545 #endif // CHROME_BROWSER_UI_GTK_LOCATION_BAR_VIEW_GTK_H_ |
| OLD | NEW |