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

Side by Side Diff: chrome/browser/ui/views/browser_actions_container.h

Issue 7057058: Convert BrowserActionsContainer context menu from Menu2 to MenuItemView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initialize pointer to NULL. Created 9 years, 6 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_VIEWS_BROWSER_ACTIONS_CONTAINER_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_BROWSER_ACTIONS_CONTAINER_H_
6 #define CHROME_BROWSER_UI_VIEWS_BROWSER_ACTIONS_CONTAINER_H_ 6 #define CHROME_BROWSER_UI_VIEWS_BROWSER_ACTIONS_CONTAINER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 27 matching lines...) Expand all
38 38
39 namespace gfx { 39 namespace gfx {
40 class CanvasSkia; 40 class CanvasSkia;
41 } 41 }
42 42
43 namespace ui { 43 namespace ui {
44 class SlideAnimation; 44 class SlideAnimation;
45 } 45 }
46 46
47 namespace views { 47 namespace views {
48 class Menu2; 48 class MenuItemView;
49 } 49 }
50 50
51 //////////////////////////////////////////////////////////////////////////////// 51 ////////////////////////////////////////////////////////////////////////////////
52 // BrowserActionButton 52 // BrowserActionButton
53 53
54 // The BrowserActionButton is a specialization of the MenuButton class. 54 // The BrowserActionButton is a specialization of the MenuButton class.
55 // It acts on a ExtensionAction, in this case a BrowserAction and handles 55 // It acts on a ExtensionAction, in this case a BrowserAction and handles
56 // loading the image for the button asynchronously on the file thread. 56 // loading the image for the button asynchronously on the file thread.
57 class BrowserActionButton : public views::MenuButton, 57 class BrowserActionButton : public views::MenuButton,
58 public views::ButtonListener, 58 public views::ButtonListener,
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 ExtensionAction* browser_action_; 124 ExtensionAction* browser_action_;
125 125
126 // The extension associated with the browser action we're displaying. 126 // The extension associated with the browser action we're displaying.
127 const Extension* extension_; 127 const Extension* extension_;
128 128
129 // The object that is waiting for the image loading to complete 129 // The object that is waiting for the image loading to complete
130 // asynchronously. 130 // asynchronously.
131 ImageLoadingTracker tracker_; 131 ImageLoadingTracker tracker_;
132 132
133 // Whether we are currently showing/just finished showing a context menu. 133 // Whether we are currently showing/just finished showing a context menu.
134 bool showing_context_menu_; 134 bool showing_context_menu_;
Peter Kasting 2011/06/09 00:39:09 Nit: This variable isn't needed; callers can just
rhashimoto 2011/06/09 01:15:27 Done.
135 135
136 // The default icon for our browser action. This might be non-empty if the 136 // The default icon for our browser action. This might be non-empty if the
137 // browser action had a value for default_icon in the manifest. 137 // browser action had a value for default_icon in the manifest.
138 SkBitmap default_icon_; 138 SkBitmap default_icon_;
139 139
140 // The browser action shelf. 140 // The browser action shelf.
141 BrowserActionsContainer* panel_; 141 BrowserActionsContainer* panel_;
142 142
143 scoped_refptr<ExtensionContextMenuModel> context_menu_contents_; 143 scoped_refptr<ExtensionContextMenuModel> context_menu_contents_;
144 scoped_ptr<views::Menu2> context_menu_menu_; 144 views::MenuItemView* context_menu_menu_;
Peter Kasting 2011/06/09 00:39:09 Nit: Might want to comment: // Only non-NULL whil
rhashimoto 2011/06/09 01:15:27 Done.
145 145
146 NotificationRegistrar registrar_; 146 NotificationRegistrar registrar_;
147 147
148 friend class DeleteTask<BrowserActionButton>; 148 friend class DeleteTask<BrowserActionButton>;
149 149
150 DISALLOW_COPY_AND_ASSIGN(BrowserActionButton); 150 DISALLOW_COPY_AND_ASSIGN(BrowserActionButton);
151 }; 151 };
152 152
153 153
154 //////////////////////////////////////////////////////////////////////////////// 154 ////////////////////////////////////////////////////////////////////////////////
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 516
517 ScopedRunnableMethodFactory<BrowserActionsContainer> task_factory_; 517 ScopedRunnableMethodFactory<BrowserActionsContainer> task_factory_;
518 518
519 // Handles delayed showing of the overflow menu when hovering. 519 // Handles delayed showing of the overflow menu when hovering.
520 ScopedRunnableMethodFactory<BrowserActionsContainer> show_menu_task_factory_; 520 ScopedRunnableMethodFactory<BrowserActionsContainer> show_menu_task_factory_;
521 521
522 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer); 522 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer);
523 }; 523 };
524 524
525 #endif // CHROME_BROWSER_UI_VIEWS_BROWSER_ACTIONS_CONTAINER_H_ 525 #endif // CHROME_BROWSER_UI_VIEWS_BROWSER_ACTIONS_CONTAINER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698