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

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

Issue 1105008: Allow Extensions to have MSAA information (Closed)
Patch Set: Created 10 years, 9 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) 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 class BrowserActionView : public views::View { 130 class BrowserActionView : public views::View {
131 public: 131 public:
132 BrowserActionView(Extension* extension, BrowserActionsContainer* panel); 132 BrowserActionView(Extension* extension, BrowserActionsContainer* panel);
133 BrowserActionButton* button() { return button_; } 133 BrowserActionButton* button() { return button_; }
134 134
135 // Allocates a canvas object on the heap and draws into it the icon for the 135 // Allocates a canvas object on the heap and draws into it the icon for the
136 // view as well as the badge (if any). Caller is responsible for deleting the 136 // view as well as the badge (if any). Caller is responsible for deleting the
137 // returned object. 137 // returned object.
138 gfx::Canvas* GetIconWithBadge(); 138 gfx::Canvas* GetIconWithBadge();
139 139
140 // Accessibility accessors, overridden from View.
141 virtual bool GetAccessibleRole(AccessibilityTypes::Role* role);
142 virtual bool GetAccessibleName(std::wstring* name);
143
140 private: 144 private:
141 virtual void Layout(); 145 virtual void Layout();
142 146
143 // Override PaintChildren so that we can paint the badge on top of children. 147 // Override PaintChildren so that we can paint the badge on top of children.
144 virtual void PaintChildren(gfx::Canvas* canvas); 148 virtual void PaintChildren(gfx::Canvas* canvas);
145 149
146 // The container for this view. 150 // The container for this view.
147 BrowserActionsContainer* panel_; 151 BrowserActionsContainer* panel_;
148 152
149 // The button this view contains. 153 // The button this view contains.
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 views::View* parent, 302 views::View* parent,
299 views::View* child); 303 views::View* child);
300 virtual bool GetDropFormats( 304 virtual bool GetDropFormats(
301 int* formats, std::set<OSExchangeData::CustomFormat>* custom_formats); 305 int* formats, std::set<OSExchangeData::CustomFormat>* custom_formats);
302 virtual bool AreDropTypesRequired(); 306 virtual bool AreDropTypesRequired();
303 virtual bool CanDrop(const OSExchangeData& data); 307 virtual bool CanDrop(const OSExchangeData& data);
304 virtual void OnDragEntered(const views::DropTargetEvent& event); 308 virtual void OnDragEntered(const views::DropTargetEvent& event);
305 virtual int OnDragUpdated(const views::DropTargetEvent& event); 309 virtual int OnDragUpdated(const views::DropTargetEvent& event);
306 virtual void OnDragExited(); 310 virtual void OnDragExited();
307 virtual int OnPerformDrop(const views::DropTargetEvent& event); 311 virtual int OnPerformDrop(const views::DropTargetEvent& event);
312 virtual bool GetAccessibleRole(AccessibilityTypes::Role* role);
313 virtual bool GetAccessibleName(std::wstring* name);
308 314
309 // Overridden from views::ViewMenuDelegate: 315 // Overridden from views::ViewMenuDelegate:
310 virtual void RunMenu(View* source, const gfx::Point& pt); 316 virtual void RunMenu(View* source, const gfx::Point& pt);
311 317
312 // Overridden from views::DragController: 318 // Overridden from views::DragController:
313 virtual void WriteDragData(View* sender, 319 virtual void WriteDragData(View* sender,
314 const gfx::Point& press_pt, 320 const gfx::Point& press_pt,
315 OSExchangeData* data); 321 OSExchangeData* data);
316 virtual int GetDragOperations(View* sender, const gfx::Point& p); 322 virtual int GetDragOperations(View* sender, const gfx::Point& p);
317 virtual bool CanStartDrag(View* sender, 323 virtual bool CanStartDrag(View* sender,
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 479
474 ScopedRunnableMethodFactory<BrowserActionsContainer> task_factory_; 480 ScopedRunnableMethodFactory<BrowserActionsContainer> task_factory_;
475 481
476 // Handles delayed showing of the overflow menu when hovering. 482 // Handles delayed showing of the overflow menu when hovering.
477 ScopedRunnableMethodFactory<BrowserActionsContainer> show_menu_task_factory_; 483 ScopedRunnableMethodFactory<BrowserActionsContainer> show_menu_task_factory_;
478 484
479 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer); 485 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer);
480 }; 486 };
481 487
482 #endif // CHROME_BROWSER_VIEWS_BROWSER_ACTIONS_CONTAINER_H_ 488 #endif // CHROME_BROWSER_VIEWS_BROWSER_ACTIONS_CONTAINER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698