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

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

Issue 575016: Now showing the browser action image (including badge) when dragging and... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_VIEWS_BROWSER_ACTIONS_CONTAINER_H_ 5 #ifndef CHROME_BROWSER_VIEWS_BROWSER_ACTIONS_CONTAINER_H_
6 #define CHROME_BROWSER_VIEWS_BROWSER_ACTIONS_CONTAINER_H_ 6 #define CHROME_BROWSER_VIEWS_BROWSER_ACTIONS_CONTAINER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 //////////////////////////////////////////////////////////////////////////////// 126 ////////////////////////////////////////////////////////////////////////////////
127 // BrowserActionView 127 // BrowserActionView
128 // A single section in the browser action container. This contains the actual 128 // A single section in the browser action container. This contains the actual
129 // BrowserActionButton, as well as the logic to paint the badge. 129 // BrowserActionButton, as well as the logic to paint the badge.
130 130
131 class BrowserActionView : public views::View { 131 class BrowserActionView : public views::View {
132 public: 132 public:
133 BrowserActionView(Extension* extension, BrowserActionsContainer* panel); 133 BrowserActionView(Extension* extension, BrowserActionsContainer* panel);
134 BrowserActionButton* button() { return button_; } 134 BrowserActionButton* button() { return button_; }
135 135
136 // Allocates a canvas object on the heap and draws into it the icon for the
137 // view as well as the badge (if any). Caller is responsible for deleting the
138 // returned object.
139 gfx::Canvas* GetIconWithBadge();
140
136 private: 141 private:
137 virtual void Layout(); 142 virtual void Layout();
138 143
139 // Override PaintChildren so that we can paint the badge on top of children. 144 // Override PaintChildren so that we can paint the badge on top of children.
140 virtual void PaintChildren(gfx::Canvas* canvas); 145 virtual void PaintChildren(gfx::Canvas* canvas);
141 146
142 // The container for this view. 147 // The container for this view.
143 BrowserActionsContainer* panel_; 148 BrowserActionsContainer* panel_;
144 149
145 // The button this view contains. 150 // The button this view contains.
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 451
447 ScopedRunnableMethodFactory<BrowserActionsContainer> task_factory_; 452 ScopedRunnableMethodFactory<BrowserActionsContainer> task_factory_;
448 453
449 // Handles delayed showing of the overflow menu when hovering. 454 // Handles delayed showing of the overflow menu when hovering.
450 ScopedRunnableMethodFactory<BrowserActionsContainer> show_menu_task_factory_; 455 ScopedRunnableMethodFactory<BrowserActionsContainer> show_menu_task_factory_;
451 456
452 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer); 457 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer);
453 }; 458 };
454 459
455 #endif // CHROME_BROWSER_VIEWS_BROWSER_ACTIONS_CONTAINER_H_ 460 #endif // CHROME_BROWSER_VIEWS_BROWSER_ACTIONS_CONTAINER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/views/browser_actions_container.cc » ('j') | chrome/browser/views/browser_actions_container.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698