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

Side by Side Diff: chrome/browser/ui/gtk/location_bar_view_gtk.h

Issue 10736028: Refactor browser window zoom handling and enable zoom icon on all platforms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 4 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) 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/command_observer.h" 18 #include "chrome/browser/command_observer.h"
19 #include "chrome/browser/extensions/extension_context_menu_model.h" 19 #include "chrome/browser/extensions/extension_context_menu_model.h"
20 #include "chrome/browser/extensions/image_loading_tracker.h" 20 #include "chrome/browser/extensions/image_loading_tracker.h"
21 #include "chrome/browser/prefs/pref_member.h" 21 #include "chrome/browser/prefs/pref_member.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 "third_party/skia/include/core/SkBitmap.h" 33 #include "third_party/skia/include/core/SkBitmap.h"
35 #include "ui/base/animation/animation_delegate.h" 34 #include "ui/base/animation/animation_delegate.h"
36 #include "ui/base/animation/slide_animation.h" 35 #include "ui/base/animation/slide_animation.h"
37 #include "ui/base/gtk/gtk_signal.h" 36 #include "ui/base/gtk/gtk_signal.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 91
93 // Retrieves the GtkWidget which is associated with PageActionView 92 // Retrieves the GtkWidget which is associated with PageActionView
94 // corresponding to |page_action|. 93 // corresponding to |page_action|.
95 GtkWidget* GetPageActionWidget(ExtensionAction* page_action); 94 GtkWidget* GetPageActionWidget(ExtensionAction* page_action);
96 95
97 // Updates the location bar. We also reset the bar's permanent text and 96 // Updates the location bar. We also reset the bar's permanent text and
98 // security style, and, if |tab_for_state_restoring| is non-NULL, also 97 // security style, and, if |tab_for_state_restoring| is non-NULL, also
99 // restore saved state that the tab holds. 98 // restore saved state that the tab holds.
100 void Update(const content::WebContents* tab_for_state_restoring); 99 void Update(const content::WebContents* tab_for_state_restoring);
101 100
102 // Show the zoom bubble.
103 void ShowZoomBubble(int zoom_percent);
104
105 // Show the bookmark bubble. 101 // Show the bookmark bubble.
106 void ShowStarBubble(const GURL& url, bool newly_boomkarked); 102 void ShowStarBubble(const GURL& url, bool newly_boomkarked);
107 103
108 // Shows the Chrome To Mobile bubble. 104 // Shows the Chrome To Mobile bubble.
109 void ShowChromeToMobileBubble(); 105 void ShowChromeToMobileBubble();
110 106
111 // Sets the tooltip for the zoom icon. 107 // Shows the bookmark bubble.
112 void SetZoomIconTooltipPercent(int zoom_percent); 108 void ShowZoomBubble();
113 109
114 // Sets the zoom icon state. 110 // Happens when the zoom changes for the active tab. |can_show_bubble| will be
115 void SetZoomIconState(ZoomController::ZoomIconState zoom_icon_state); 111 // true if it was a user action, but the bubble still shouldn't be shown if
112 // the wrench menu is showing.
113 void ZoomChangedForActiveTab(bool can_show_bubble);
116 114
117 // Set the starred state of the bookmark star. 115 // Set the starred state of the bookmark star.
118 void SetStarred(bool starred); 116 void SetStarred(bool starred);
119 117
120 // OmniboxEditController: 118 // OmniboxEditController:
121 virtual void OnAutocompleteAccept(const GURL& url, 119 virtual void OnAutocompleteAccept(const GURL& url,
122 WindowOpenDisposition disposition, 120 WindowOpenDisposition disposition,
123 content::PageTransition transition, 121 content::PageTransition transition,
124 const GURL& alternate_nav_url) OVERRIDE; 122 const GURL& alternate_nav_url) OVERRIDE;
125 virtual void OnChanged() OVERRIDE; 123 virtual void OnChanged() OVERRIDE;
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 BooleanPrefMember edit_bookmarks_enabled_; 530 BooleanPrefMember edit_bookmarks_enabled_;
533 531
534 // Used to remember the URL and title text when drag&drop has begun. 532 // Used to remember the URL and title text when drag&drop has begun.
535 GURL drag_url_; 533 GURL drag_url_;
536 string16 drag_title_; 534 string16 drag_title_;
537 535
538 DISALLOW_COPY_AND_ASSIGN(LocationBarViewGtk); 536 DISALLOW_COPY_AND_ASSIGN(LocationBarViewGtk);
539 }; 537 };
540 538
541 #endif // CHROME_BROWSER_UI_GTK_LOCATION_BAR_VIEW_GTK_H_ 539 #endif // CHROME_BROWSER_UI_GTK_LOCATION_BAR_VIEW_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698