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

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

Issue 25305002: Implement initial chrome.browserAction.openPopup API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move to interactive_ui_test Created 7 years, 2 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
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_BROWSER_ACTIONS_TOOLBAR_GTK_H_ 5 #ifndef CHROME_BROWSER_UI_GTK_BROWSER_ACTIONS_TOOLBAR_GTK_H_
6 #define CHROME_BROWSER_UI_GTK_BROWSER_ACTIONS_TOOLBAR_GTK_H_ 6 #define CHROME_BROWSER_UI_GTK_BROWSER_ACTIONS_TOOLBAR_GTK_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 explicit BrowserActionsToolbarGtk(Browser* browser); 45 explicit BrowserActionsToolbarGtk(Browser* browser);
46 virtual ~BrowserActionsToolbarGtk(); 46 virtual ~BrowserActionsToolbarGtk();
47 47
48 GtkWidget* widget() { return hbox_.get(); } 48 GtkWidget* widget() { return hbox_.get(); }
49 GtkWidget* chevron() { return overflow_button_->widget(); } 49 GtkWidget* chevron() { return overflow_button_->widget(); }
50 50
51 // Returns the widget in use by the BrowserActionButton corresponding to 51 // Returns the widget in use by the BrowserActionButton corresponding to
52 // |extension|. Used in positioning the ExtensionInstalledBubble for 52 // |extension|. Used in positioning the ExtensionInstalledBubble for
53 // BrowserActions. 53 // BrowserActions.
54 GtkWidget* GetBrowserActionWidget(const extensions::Extension* extension); 54 GtkWidget* GetBrowserActionWidget(const extensions::Extension* extension);
55 BrowserActionButton* GetBrowserActionButton(
56 const extensions::Extension* extension);
55 57
56 int button_count() { return extension_button_map_.size(); } 58 int button_count() { return extension_button_map_.size(); }
57 59
58 Browser* browser() { return browser_; } 60 Browser* browser() { return browser_; }
59 61
60 ExtensionToolbarModel* model() { return model_; } 62 ExtensionToolbarModel* model() { return model_; }
61 63
62 // Returns the currently selected tab ID, or -1 if there is none. 64 // Returns the currently selected tab ID, or -1 if there is none.
63 int GetCurrentTabId() const; 65 int GetCurrentTabId() const;
64 66
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // for incognito. 113 // for incognito.
112 bool ShouldDisplayBrowserAction(const extensions::Extension* extension); 114 bool ShouldDisplayBrowserAction(const extensions::Extension* extension);
113 115
114 // ExtensionToolbarModel::Observer implementation. 116 // ExtensionToolbarModel::Observer implementation.
115 virtual void BrowserActionAdded(const extensions::Extension* extension, 117 virtual void BrowserActionAdded(const extensions::Extension* extension,
116 int index) OVERRIDE; 118 int index) OVERRIDE;
117 virtual void BrowserActionRemoved( 119 virtual void BrowserActionRemoved(
118 const extensions::Extension* extension) OVERRIDE; 120 const extensions::Extension* extension) OVERRIDE;
119 virtual void BrowserActionMoved(const extensions::Extension* extension, 121 virtual void BrowserActionMoved(const extensions::Extension* extension,
120 int index) OVERRIDE; 122 int index) OVERRIDE;
123 virtual bool BrowserActionShowPopup(
124 const extensions::Extension* extension) OVERRIDE;
121 virtual void ModelLoaded() OVERRIDE; 125 virtual void ModelLoaded() OVERRIDE;
122 126
123 // gfx::AnimationDelegate implementation. 127 // gfx::AnimationDelegate implementation.
124 virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE; 128 virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE;
125 virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE; 129 virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE;
126 130
127 // SimpleMenuModel::Delegate implementation. 131 // SimpleMenuModel::Delegate implementation.
128 // In our case, |command_id| is be the index into the model's extension list. 132 // In our case, |command_id| is be the index into the model's extension list.
129 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; 133 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
130 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; 134 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 ui::GtkSignalRegistrar signals_; 227 ui::GtkSignalRegistrar signals_;
224 228
225 content::NotificationRegistrar registrar_; 229 content::NotificationRegistrar registrar_;
226 230
227 base::WeakPtrFactory<BrowserActionsToolbarGtk> weak_factory_; 231 base::WeakPtrFactory<BrowserActionsToolbarGtk> weak_factory_;
228 232
229 DISALLOW_COPY_AND_ASSIGN(BrowserActionsToolbarGtk); 233 DISALLOW_COPY_AND_ASSIGN(BrowserActionsToolbarGtk);
230 }; 234 };
231 235
232 #endif // CHROME_BROWSER_UI_GTK_BROWSER_ACTIONS_TOOLBAR_GTK_H_ 236 #endif // CHROME_BROWSER_UI_GTK_BROWSER_ACTIONS_TOOLBAR_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698