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 | 7 |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
16 #include "base/memory/scoped_vector.h" | 16 #include "base/memory/scoped_vector.h" |
17 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
18 #include "chrome/browser/api/prefs/pref_member.h" | 18 #include "chrome/browser/api/prefs/pref_member.h" |
19 #include "chrome/browser/command_observer.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/ui/gtk/bubble/bubble_gtk.h" | 22 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h" |
23 #include "chrome/browser/ui/gtk/menu_gtk.h" | 23 #include "chrome/browser/ui/gtk/menu_gtk.h" |
24 #include "chrome/browser/ui/omnibox/location_bar.h" | 24 #include "chrome/browser/ui/omnibox/location_bar.h" |
25 #include "chrome/browser/ui/omnibox/omnibox_edit_controller.h" | 25 #include "chrome/browser/ui/omnibox/omnibox_edit_controller.h" |
26 #include "chrome/browser/ui/view_ids.h" | 26 #include "chrome/browser/ui/view_ids.h" |
27 #include "chrome/browser/ui/zoom/zoom_controller.h" | |
28 #include "chrome/common/content_settings_types.h" | 27 #include "chrome/common/content_settings_types.h" |
29 #include "chrome/common/extensions/extension_action.h" | 28 #include "chrome/common/extensions/extension_action.h" |
30 #include "content/public/browser/notification_observer.h" | 29 #include "content/public/browser/notification_observer.h" |
31 #include "content/public/browser/notification_registrar.h" | 30 #include "content/public/browser/notification_registrar.h" |
32 #include "content/public/common/page_transition_types.h" | 31 #include "content/public/common/page_transition_types.h" |
33 #include "googleurl/src/gurl.h" | 32 #include "googleurl/src/gurl.h" |
34 #include "ui/base/animation/animation_delegate.h" | 33 #include "ui/base/animation/animation_delegate.h" |
35 #include "ui/base/animation/slide_animation.h" | 34 #include "ui/base/animation/slide_animation.h" |
36 #include "ui/base/gtk/gtk_signal.h" | 35 #include "ui/base/gtk/gtk_signal.h" |
37 #include "ui/base/gtk/owned_widget_gtk.h" | 36 #include "ui/base/gtk/owned_widget_gtk.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 93 |
95 // Retrieves the GtkWidget which is associated with PageActionView | 94 // Retrieves the GtkWidget which is associated with PageActionView |
96 // corresponding to |page_action|. | 95 // corresponding to |page_action|. |
97 GtkWidget* GetPageActionWidget(ExtensionAction* page_action); | 96 GtkWidget* GetPageActionWidget(ExtensionAction* page_action); |
98 | 97 |
99 // Updates the location bar. We also reset the bar's permanent text and | 98 // Updates the location bar. We also reset the bar's permanent text and |
100 // security style, and, if |tab_for_state_restoring| is non-NULL, also | 99 // security style, and, if |tab_for_state_restoring| is non-NULL, also |
101 // restore saved state that the tab holds. | 100 // restore saved state that the tab holds. |
102 void Update(const content::WebContents* tab_for_state_restoring); | 101 void Update(const content::WebContents* tab_for_state_restoring); |
103 | 102 |
104 // Show the zoom bubble. | |
105 void ShowZoomBubble(int zoom_percent); | |
106 | |
107 // Show the bookmark bubble. | 103 // Show the bookmark bubble. |
108 void ShowStarBubble(const GURL& url, bool newly_boomkarked); | 104 void ShowStarBubble(const GURL& url, bool newly_boomkarked); |
109 | 105 |
110 // Shows the Chrome To Mobile bubble. | 106 // Shows the Chrome To Mobile bubble. |
111 void ShowChromeToMobileBubble(); | 107 void ShowChromeToMobileBubble(); |
112 | 108 |
113 // Sets the tooltip for the zoom icon. | 109 // Shows the bookmark bubble. |
114 void SetZoomIconTooltipPercent(int zoom_percent); | 110 void ShowZoomBubble(); |
115 | 111 |
116 // Sets the zoom icon state. | 112 // Happens when the zoom changes for the active tab. |can_show_bubble| will be |
117 void SetZoomIconState(ZoomController::ZoomIconState zoom_icon_state); | 113 // true if it was a user action and a bubble could be shown. |
| 114 void ZoomChangedForActiveTab(bool can_show_bubble); |
118 | 115 |
119 // Set the starred state of the bookmark star. | 116 // Set the starred state of the bookmark star. |
120 void SetStarred(bool starred); | 117 void SetStarred(bool starred); |
121 | 118 |
122 // OmniboxEditController: | 119 // OmniboxEditController: |
123 virtual void OnAutocompleteAccept(const GURL& url, | 120 virtual void OnAutocompleteAccept(const GURL& url, |
124 WindowOpenDisposition disposition, | 121 WindowOpenDisposition disposition, |
125 content::PageTransition transition, | 122 content::PageTransition transition, |
126 const GURL& alternate_nav_url) OVERRIDE; | 123 const GURL& alternate_nav_url) OVERRIDE; |
127 virtual void OnChanged() OVERRIDE; | 124 virtual void OnChanged() OVERRIDE; |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 BooleanPrefMember edit_bookmarks_enabled_; | 536 BooleanPrefMember edit_bookmarks_enabled_; |
540 | 537 |
541 // Used to remember the URL and title text when drag&drop has begun. | 538 // Used to remember the URL and title text when drag&drop has begun. |
542 GURL drag_url_; | 539 GURL drag_url_; |
543 string16 drag_title_; | 540 string16 drag_title_; |
544 | 541 |
545 DISALLOW_COPY_AND_ASSIGN(LocationBarViewGtk); | 542 DISALLOW_COPY_AND_ASSIGN(LocationBarViewGtk); |
546 }; | 543 }; |
547 | 544 |
548 #endif // CHROME_BROWSER_UI_GTK_LOCATION_BAR_VIEW_GTK_H_ | 545 #endif // CHROME_BROWSER_UI_GTK_LOCATION_BAR_VIEW_GTK_H_ |
OLD | NEW |