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

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

Issue 567037: Initial work on making extensions work in incognito mode. (Closed)
Patch Set: added experimental requirement Created 10 years, 10 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_GTK_BROWSER_ACTIONS_TOOLBAR_GTK_H_ 5 #ifndef CHROME_BROWSER_GTK_BROWSER_ACTIONS_TOOLBAR_GTK_H_
6 #define CHROME_BROWSER_GTK_BROWSER_ACTIONS_TOOLBAR_GTK_H_ 6 #define CHROME_BROWSER_GTK_BROWSER_ACTIONS_TOOLBAR_GTK_H_
7 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // Delete resources associated with UI for a browser action. 62 // Delete resources associated with UI for a browser action.
63 void RemoveButtonForExtension(Extension* extension); 63 void RemoveButtonForExtension(Extension* extension);
64 64
65 // Change the visibility of widget() based on whether we have any buttons 65 // Change the visibility of widget() based on whether we have any buttons
66 // to show. 66 // to show.
67 void UpdateVisibility(); 67 void UpdateVisibility();
68 68
69 // Hide the extension popup, if any. 69 // Hide the extension popup, if any.
70 void HidePopup(); 70 void HidePopup();
71 71
72 // Returns true if this extension should be shown in this toolbar. This can
73 // return false if we are in an incognito window and the extension is disabled
74 // for incognito.
75 bool ShouldDisplayBrowserAction(Extension* extension);
76
72 // ExtensionToolbarModel::Observer implementation. 77 // ExtensionToolbarModel::Observer implementation.
73 virtual void BrowserActionAdded(Extension* extension, int index); 78 virtual void BrowserActionAdded(Extension* extension, int index);
74 virtual void BrowserActionRemoved(Extension* extension); 79 virtual void BrowserActionRemoved(Extension* extension);
75 virtual void BrowserActionMoved(Extension* extension, int index); 80 virtual void BrowserActionMoved(Extension* extension, int index);
76 81
77 // Called by the BrowserActionButton in response to drag-begin. 82 // Called by the BrowserActionButton in response to drag-begin.
78 void DragStarted(BrowserActionButton* button, GdkDragContext* drag_context); 83 void DragStarted(BrowserActionButton* button, GdkDragContext* drag_context);
79 84
80 static gboolean OnDragMotionThunk(GtkWidget* widget, 85 static gboolean OnDragMotionThunk(GtkWidget* widget,
81 GdkDragContext* drag_context, 86 GdkDragContext* drag_context,
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 // a chrome button and related functionality. There should be one entry 141 // a chrome button and related functionality. There should be one entry
137 // for every extension that has a browser action. 142 // for every extension that has a browser action.
138 typedef std::map<std::string, linked_ptr<BrowserActionButton> > 143 typedef std::map<std::string, linked_ptr<BrowserActionButton> >
139 ExtensionButtonMap; 144 ExtensionButtonMap;
140 ExtensionButtonMap extension_button_map_; 145 ExtensionButtonMap extension_button_map_;
141 146
142 DISALLOW_COPY_AND_ASSIGN(BrowserActionsToolbarGtk); 147 DISALLOW_COPY_AND_ASSIGN(BrowserActionsToolbarGtk);
143 }; 148 };
144 149
145 #endif // CHROME_BROWSER_GTK_BROWSER_ACTIONS_TOOLBAR_GTK_H_ 150 #endif // CHROME_BROWSER_GTK_BROWSER_ACTIONS_TOOLBAR_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/user_script_master.cc ('k') | chrome/browser/gtk/browser_actions_toolbar_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698