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

Side by Side Diff: ash/launcher/launcher_button.h

Issue 16979002: Add ContextMenuSourceType to views::ContextMenuController::ShowContextMenuForView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win build Created 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 ASH_LAUNCHER_LAUNCHER_BUTTON_H_ 5 #ifndef ASH_LAUNCHER_LAUNCHER_BUTTON_H_
6 #define ASH_LAUNCHER_LAUNCHER_BUTTON_H_ 6 #define ASH_LAUNCHER_LAUNCHER_BUTTON_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ui/gfx/shadow_value.h" 9 #include "ui/gfx/shadow_value.h"
10 #include "ui/views/controls/button/custom_button.h" 10 #include "ui/views/controls/button/custom_button.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 int state() const { return state_; } 52 int state() const { return state_; }
53 const ShelfLayoutManager* shelf_layout_manager() const { 53 const ShelfLayoutManager* shelf_layout_manager() const {
54 return shelf_layout_manager_; 54 return shelf_layout_manager_;
55 } 55 }
56 56
57 // Returns the bounds of the icon. 57 // Returns the bounds of the icon.
58 gfx::Rect GetIconBounds() const; 58 gfx::Rect GetIconBounds() const;
59 59
60 // Overrides to views::CustomButton: 60 // Overrides to views::CustomButton:
61 virtual void ShowContextMenu(const gfx::Point& p, 61 virtual void ShowContextMenu(const gfx::Point& p,
62 bool is_mouse_gesture) OVERRIDE; 62 ui::MenuSourceType source_type) OVERRIDE;
63 63
64 protected: 64 protected:
65 LauncherButton(views::ButtonListener* listener, 65 LauncherButton(views::ButtonListener* listener,
66 LauncherButtonHost* host, 66 LauncherButtonHost* host,
67 ShelfLayoutManager* shelf_layout_manager); 67 ShelfLayoutManager* shelf_layout_manager);
68 68
69 // Class that draws the icon part of a button, so it can be animated 69 // Class that draws the icon part of a button, so it can be animated
70 // independently of the rest. This can be subclassed to provide a custom 70 // independently of the rest. This can be subclassed to provide a custom
71 // implementation, by overriding CreateIconView(). 71 // implementation, by overriding CreateIconView().
72 class IconView : public views::ImageView { 72 class IconView : public views::ImageView {
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // showing and used to detect if the menu was deleted while running. 141 // showing and used to detect if the menu was deleted while running.
142 bool* destroyed_flag_; 142 bool* destroyed_flag_;
143 143
144 DISALLOW_COPY_AND_ASSIGN(LauncherButton); 144 DISALLOW_COPY_AND_ASSIGN(LauncherButton);
145 }; 145 };
146 146
147 } // namespace internal 147 } // namespace internal
148 } // namespace ash 148 } // namespace ash
149 149
150 #endif // ASH_LAUNCHER_LAUNCHER_BUTTON_H_ 150 #endif // ASH_LAUNCHER_LAUNCHER_BUTTON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698