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

Side by Side Diff: ash/common/system/chromeos/palette/palette_tray.h

Issue 2303963002: cros/ash: If the partial magnifier is active, do not consume input events if over palette views. (Closed)
Patch Set: Address comments Created 4 years, 3 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
« no previous file with comments | « no previous file | ash/common/system/chromeos/palette/palette_tray.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_CHROMEOS_PALETTE_PALETTE_BUTTON_TRAY_H_ 5 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_BUTTON_TRAY_H_
6 #define ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_BUTTON_TRAY_H_ 6 #define ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_BUTTON_TRAY_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 10
11 #include "ash/ash_export.h" 11 #include "ash/ash_export.h"
12 #include "ash/common/palette_delegate.h" 12 #include "ash/common/palette_delegate.h"
13 #include "ash/common/session/session_state_observer.h" 13 #include "ash/common/session/session_state_observer.h"
14 #include "ash/common/shell_observer.h" 14 #include "ash/common/shell_observer.h"
15 #include "ash/common/system/chromeos/palette/palette_tool_manager.h" 15 #include "ash/common/system/chromeos/palette/palette_tool_manager.h"
16 #include "ash/common/system/tray/tray_background_view.h" 16 #include "ash/common/system/tray/tray_background_view.h"
17 #include "base/macros.h" 17 #include "base/macros.h"
18 #include "base/memory/weak_ptr.h" 18 #include "base/memory/weak_ptr.h"
19 19
20 namespace gfx {
21 class Point;
22 }
23
20 namespace views { 24 namespace views {
21 class ImageView; 25 class ImageView;
22 class Widget; 26 class Widget;
23 } 27 }
24 28
25 namespace ash { 29 namespace ash {
26 30
27 class TrayBubbleWrapper; 31 class TrayBubbleWrapper;
28 class PaletteToolManager; 32 class PaletteToolManager;
29 33
(...skipping 28 matching lines...) Expand all
58 // PaletteToolManager::Delegate: 62 // PaletteToolManager::Delegate:
59 void HidePalette() override; 63 void HidePalette() override;
60 64
61 // Returns true if the shelf should not autohide. 65 // Returns true if the shelf should not autohide.
62 bool ShouldBlockShelfAutoHide() const; 66 bool ShouldBlockShelfAutoHide() const;
63 67
64 // Opens up the palette if it is not already open. Returns true if the palette 68 // Opens up the palette if it is not already open. Returns true if the palette
65 // was opened. 69 // was opened.
66 bool ShowPalette(); 70 bool ShowPalette();
67 71
72 // Returns true if the palette tray contains the given point. This is useful
73 // for determining if an event should be propagated through to the palette.
74 bool ContainsPointInScreen(const gfx::Point& point);
75
68 private: 76 private:
69 // views::TrayBubbleView::Delegate: 77 // views::TrayBubbleView::Delegate:
70 void BubbleViewDestroyed() override; 78 void BubbleViewDestroyed() override;
71 void OnMouseEnteredView() override; 79 void OnMouseEnteredView() override;
72 void OnMouseExitedView() override; 80 void OnMouseExitedView() override;
73 base::string16 GetAccessibleNameForBubble() override; 81 base::string16 GetAccessibleNameForBubble() override;
74 gfx::Rect GetAnchorRect(views::Widget* anchor_widget, 82 gfx::Rect GetAnchorRect(views::Widget* anchor_widget,
75 AnchorType anchor_type, 83 AnchorType anchor_type,
76 AnchorAlignment anchor_alignment) const override; 84 AnchorAlignment anchor_alignment) const override;
77 void OnBeforeBubbleWidgetInit( 85 void OnBeforeBubbleWidgetInit(
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 views::ImageView* icon_; 122 views::ImageView* icon_;
115 123
116 base::WeakPtrFactory<PaletteTray> weak_factory_; 124 base::WeakPtrFactory<PaletteTray> weak_factory_;
117 125
118 DISALLOW_COPY_AND_ASSIGN(PaletteTray); 126 DISALLOW_COPY_AND_ASSIGN(PaletteTray);
119 }; 127 };
120 128
121 } // namespace ash 129 } // namespace ash
122 130
123 #endif // ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_BUTTON_TRAY_H_ 131 #endif // ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_PALETTE_BUTTON_TRAY_H_
OLDNEW
« no previous file with comments | « no previous file | ash/common/system/chromeos/palette/palette_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698