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

Side by Side Diff: ash/common/system/tray/actionable_view.h

Issue 2569773002: Fix SysTray focus rect position (Closed)
Patch Set: Rearrange MD checks Created 4 years 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
« no previous file with comments | « no previous file | ash/common/system/tray/actionable_view.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_COMMON_SYSTEM_TRAY_ACTIONABLE_VIEW_H_ 5 #ifndef ASH_COMMON_SYSTEM_TRAY_ACTIONABLE_VIEW_H_
6 #define ASH_COMMON_SYSTEM_TRAY_ACTIONABLE_VIEW_H_ 6 #define ASH_COMMON_SYSTEM_TRAY_ACTIONABLE_VIEW_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/common/system/tray/tray_popup_ink_drop_style.h" 9 #include "ash/common/system/tray/tray_popup_ink_drop_style.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 30 matching lines...) Expand all
41 void CloseSystemBubble(); 41 void CloseSystemBubble();
42 42
43 protected: 43 protected:
44 SystemTrayItem* owner() { return owner_; } 44 SystemTrayItem* owner() { return owner_; }
45 45
46 // Draws focus rectangle on the canvas. 46 // Draws focus rectangle on the canvas.
47 // Default implementation draws the focus rectangle with certain inset and 47 // Default implementation draws the focus rectangle with certain inset and
48 // color. Subclasses can override to change the default settings. 48 // color. Subclasses can override to change the default settings.
49 virtual void OnPaintFocus(gfx::Canvas* canvas); 49 virtual void OnPaintFocus(gfx::Canvas* canvas);
50 50
51 // Returns the bounds to paint the focus rectangle in.
52 virtual gfx::Rect GetFocusBounds();
53
54 // Performs an action when user clicks on the view (on mouse-press event), or 51 // Performs an action when user clicks on the view (on mouse-press event), or
55 // presses a key when this view is in focus. Returns true if the event has 52 // presses a key when this view is in focus. Returns true if the event has
56 // been handled and an action was performed. Returns false otherwise. 53 // been handled and an action was performed. Returns false otherwise.
57 virtual bool PerformAction(const ui::Event& event) = 0; 54 virtual bool PerformAction(const ui::Event& event) = 0;
58 55
59 // Called after PerformAction() to act upon its result, including showing 56 // Called after PerformAction() to act upon its result, including showing
60 // appropriate ink drop ripple. This will not get called if the view is 57 // appropriate ink drop ripple. This will not get called if the view is
61 // destroyed during PerformAction(). Default implementation shows triggered 58 // destroyed during PerformAction(). Default implementation shows triggered
62 // ripple if action is performed or hides existing ripple if no action is 59 // ripple if action is performed or hides existing ripple if no action is
63 // performed. Subclasses can override to change the default behavior. 60 // performed. Subclasses can override to change the default behavior.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 106
110 private: 107 private:
111 views::ButtonListener* listener_; 108 views::ButtonListener* listener_;
112 109
113 DISALLOW_COPY_AND_ASSIGN(ButtonListenerActionableView); 110 DISALLOW_COPY_AND_ASSIGN(ButtonListenerActionableView);
114 }; 111 };
115 112
116 } // namespace ash 113 } // namespace ash
117 114
118 #endif // ASH_COMMON_SYSTEM_TRAY_ACTIONABLE_VIEW_H_ 115 #endif // ASH_COMMON_SYSTEM_TRAY_ACTIONABLE_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | ash/common/system/tray/actionable_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698