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

Side by Side Diff: ash/system/tray/tray_views.h

Issue 10827271: Replace views::Event with ui::Event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | « ash/system/tray/tray_notification_view.cc ('k') | ash/system/tray/tray_views.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) 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_SYSTEM_TRAY_TRAY_VIEWS_H_ 5 #ifndef ASH_SYSTEM_TRAY_TRAY_VIEWS_H_
6 #define ASH_SYSTEM_TRAY_TRAY_VIEWS_H_ 6 #define ASH_SYSTEM_TRAY_TRAY_VIEWS_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/wm/shelf_types.h" 9 #include "ash/wm/shelf_types.h"
10 #include "ui/gfx/font.h" 10 #include "ui/gfx/font.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // Set the accessible name. 64 // Set the accessible name.
65 void SetAccessibleName(const string16& name); 65 void SetAccessibleName(const string16& name);
66 const string16& accessible_name() const { return accessible_name_; } 66 const string16& accessible_name() const { return accessible_name_; }
67 67
68 protected: 68 protected:
69 void DrawBorder(gfx::Canvas* canvas, const gfx::Rect& bounds); 69 void DrawBorder(gfx::Canvas* canvas, const gfx::Rect& bounds);
70 70
71 // Performs an action when user clicks on the view (on mouse-press event), or 71 // Performs an action when user clicks on the view (on mouse-press event), or
72 // presses a key when this view is in focus. Returns true if the event has 72 // presses a key when this view is in focus. Returns true if the event has
73 // been handled and an action was performed. Returns false otherwise. 73 // been handled and an action was performed. Returns false otherwise.
74 virtual bool PerformAction(const views::Event& event) = 0; 74 virtual bool PerformAction(const ui::Event& event) = 0;
75 75
76 // Overridden from views::View. 76 // Overridden from views::View.
77 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; 77 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
78 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; 78 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE;
79 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; 79 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE;
80 virtual void OnMouseCaptureLost() OVERRIDE; 80 virtual void OnMouseCaptureLost() OVERRIDE;
81 virtual ui::GestureStatus OnGestureEvent( 81 virtual ui::GestureStatus OnGestureEvent(
82 const views::GestureEvent& event) OVERRIDE; 82 const views::GestureEvent& event) OVERRIDE;
83 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; 83 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
84 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE; 84 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE;
(...skipping 30 matching lines...) Expand all
115 void AddLabel(const string16& text, gfx::Font::FontStyle style); 115 void AddLabel(const string16& text, gfx::Font::FontStyle style);
116 116
117 void set_highlight_color(SkColor color) { highlight_color_ = color; } 117 void set_highlight_color(SkColor color) { highlight_color_ = color; }
118 void set_default_color(SkColor color) { default_color_ = color; } 118 void set_default_color(SkColor color) { default_color_ = color; }
119 void set_text_highlight_color(SkColor c) { text_highlight_color_ = c; } 119 void set_text_highlight_color(SkColor c) { text_highlight_color_ = c; }
120 void set_text_default_color(SkColor color) { text_default_color_ = color; } 120 void set_text_default_color(SkColor color) { text_default_color_ = color; }
121 void set_fixed_height(int height) { fixed_height_ = height; } 121 void set_fixed_height(int height) { fixed_height_ = height; }
122 122
123 private: 123 private:
124 // Overridden from ActionableView. 124 // Overridden from ActionableView.
125 virtual bool PerformAction(const views::Event& event) OVERRIDE; 125 virtual bool PerformAction(const ui::Event& event) OVERRIDE;
126 126
127 // Overridden from views::View. 127 // Overridden from views::View.
128 virtual gfx::Size GetPreferredSize() OVERRIDE; 128 virtual gfx::Size GetPreferredSize() OVERRIDE;
129 virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE; 129 virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE;
130 virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE; 130 virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE;
131 virtual void OnEnabledChanged() OVERRIDE; 131 virtual void OnEnabledChanged() OVERRIDE;
132 virtual void OnPaintBackground(gfx::Canvas* canvas) OVERRIDE; 132 virtual void OnPaintBackground(gfx::Canvas* canvas) OVERRIDE;
133 virtual void OnFocus() OVERRIDE; 133 virtual void OnFocus() OVERRIDE;
134 134
135 ViewClickListener* listener_; 135 ViewClickListener* listener_;
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 void SetTrayImageItemBorder(views::View* tray_view, ShelfAlignment alignment); 295 void SetTrayImageItemBorder(views::View* tray_view, ShelfAlignment alignment);
296 // Sets the empty border around a label tray item for adjusting the space 296 // Sets the empty border around a label tray item for adjusting the space
297 // around it. 297 // around it.
298 void SetTrayLabelItemBorder(TrayItemView* tray_view, 298 void SetTrayLabelItemBorder(TrayItemView* tray_view,
299 ShelfAlignment alignment); 299 ShelfAlignment alignment);
300 300
301 } // namespace internal 301 } // namespace internal
302 } // namespace ash 302 } // namespace ash
303 303
304 #endif // ASH_SYSTEM_TRAY_TRAY_VIEWS_H_ 304 #endif // ASH_SYSTEM_TRAY_TRAY_VIEWS_H_
OLDNEW
« no previous file with comments | « ash/system/tray/tray_notification_view.cc ('k') | ash/system/tray/tray_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698