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

Side by Side Diff: views/controls/button/button_dropdown.h

Issue 6192007: Remove wstring from views. Part 3: Switch accessibility strings to string16.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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
« no previous file with comments | « views/controls/button/button.cc ('k') | views/controls/button/button_dropdown.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 VIEWS_CONTROLS_BUTTON_BUTTON_DROPDOWN_H_ 5 #ifndef VIEWS_CONTROLS_BUTTON_BUTTON_DROPDOWN_H_
6 #define VIEWS_CONTROLS_BUTTON_BUTTON_DROPDOWN_H_ 6 #define VIEWS_CONTROLS_BUTTON_BUTTON_DROPDOWN_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/task.h" 9 #include "base/task.h"
10 #include "views/controls/button/image_button.h" 10 #include "views/controls/button/image_button.h"
11 #include "views/controls/menu/menu_2.h" 11 #include "views/controls/menu/menu_2.h"
12 12
13 namespace views { 13 namespace views {
14 14
15 //////////////////////////////////////////////////////////////////////////////// 15 ////////////////////////////////////////////////////////////////////////////////
16 // 16 //
17 // ButtonDropDown 17 // ButtonDropDown
18 // 18 //
19 // A button class that when pressed (and held) or pressed (and drag down) will 19 // A button class that when pressed (and held) or pressed (and drag down) will
20 // display a menu 20 // display a menu
21 // 21 //
22 //////////////////////////////////////////////////////////////////////////////// 22 ////////////////////////////////////////////////////////////////////////////////
23 class ButtonDropDown : public ImageButton { 23 class ButtonDropDown : public ImageButton {
24 public: 24 public:
25 ButtonDropDown(ButtonListener* listener, menus::MenuModel* model); 25 ButtonDropDown(ButtonListener* listener, menus::MenuModel* model);
26 virtual ~ButtonDropDown(); 26 virtual ~ButtonDropDown();
27 27
28 // Accessibility accessors, overridden from View. 28 // Accessibility accessors, overridden from View.
29 virtual std::wstring GetAccessibleDefaultAction(); 29 virtual string16 GetAccessibleDefaultAction() OVERRIDE;
30 virtual AccessibilityTypes::Role GetAccessibleRole(); 30 virtual AccessibilityTypes::Role GetAccessibleRole() OVERRIDE;
31 virtual AccessibilityTypes::State GetAccessibleState(); 31 virtual AccessibilityTypes::State GetAccessibleState() OVERRIDE;
32 32
33 private: 33 private:
34 // Overridden from CustomButton 34 // Overridden from CustomButton
35 virtual bool OnMousePressed(const MouseEvent& e); 35 virtual bool OnMousePressed(const MouseEvent& e);
36 virtual void OnMouseReleased(const MouseEvent& e, bool canceled); 36 virtual void OnMouseReleased(const MouseEvent& e, bool canceled);
37 virtual bool OnMouseDragged(const MouseEvent& e); 37 virtual bool OnMouseDragged(const MouseEvent& e);
38 virtual void OnMouseExited(const MouseEvent& e); 38 virtual void OnMouseExited(const MouseEvent& e);
39 39
40 // Overridden from View. Used to display the right-click menu, as triggered 40 // Overridden from View. Used to display the right-click menu, as triggered
41 // by the keyboard, for instance. Using the member function ShowDropDownMenu 41 // by the keyboard, for instance. Using the member function ShowDropDownMenu
(...skipping 19 matching lines...) Expand all
61 61
62 // A factory for tasks that show the dropdown context menu for the button. 62 // A factory for tasks that show the dropdown context menu for the button.
63 ScopedRunnableMethodFactory<ButtonDropDown> show_menu_factory_; 63 ScopedRunnableMethodFactory<ButtonDropDown> show_menu_factory_;
64 64
65 DISALLOW_COPY_AND_ASSIGN(ButtonDropDown); 65 DISALLOW_COPY_AND_ASSIGN(ButtonDropDown);
66 }; 66 };
67 67
68 } // namespace views 68 } // namespace views
69 69
70 #endif // VIEWS_CONTROLS_BUTTON_BUTTON_DROPDOWN_H_ 70 #endif // VIEWS_CONTROLS_BUTTON_BUTTON_DROPDOWN_H_
OLDNEW
« no previous file with comments | « views/controls/button/button.cc ('k') | views/controls/button/button_dropdown.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698