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

Side by Side Diff: ui/views/bubble/tray_bubble_view.h

Issue 1863523006: mash: Make system tray bubble close when another window is activated (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 8 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 | « mash/wm/root_window_controller.cc ('k') | ui/views/mus/native_widget_mus.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 UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_ 5 #ifndef UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_
6 #define UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_ 6 #define UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "ui/views/bubble/bubble_delegate.h" 10 #include "ui/views/bubble/bubble_delegate.h"
11 #include "ui/views/mouse_watcher.h" 11 #include "ui/views/mouse_watcher.h"
12 #include "ui/views/views_export.h" 12 #include "ui/views/views_export.h"
13 13
14 // Specialized bubble view for bubbles associated with a tray icon (e.g. the
15 // Ash status area). Mostly this handles custom anchor location and arrow and
16 // border rendering. This also has its own delegate for handling mouse events
17 // and other implementation specific details.
18
19 namespace ui { 14 namespace ui {
20 class LocatedEvent; 15 class LocatedEvent;
21 } 16 }
22 17
23 namespace views { 18 namespace views {
24 class View; 19 class View;
25 class Widget; 20 class Widget;
26 } 21 }
27 22
28 namespace views { 23 namespace views {
29 24
30 namespace internal { 25 namespace internal {
31 class TrayBubbleBorder; 26 class TrayBubbleBorder;
32 class TrayBubbleContentMask; 27 class TrayBubbleContentMask;
33 } 28 }
34 29
30 // Specialized bubble view for bubbles associated with a tray icon (e.g. the
31 // Ash status area). Mostly this handles custom anchor location and arrow and
32 // border rendering. This also has its own delegate for handling mouse events
33 // and other implementation specific details.
35 class VIEWS_EXPORT TrayBubbleView : public views::BubbleDelegateView, 34 class VIEWS_EXPORT TrayBubbleView : public views::BubbleDelegateView,
36 public views::MouseWatcherListener { 35 public views::MouseWatcherListener {
37 public: 36 public:
38 // AnchorType differentiates between bubbles that are anchored on a tray 37 // AnchorType differentiates between bubbles that are anchored on a tray
39 // element (ANCHOR_TYPE_TRAY) and display an arrow, or that are floating on 38 // element (ANCHOR_TYPE_TRAY) and display an arrow, or that are floating on
40 // the screen away from the tray (ANCHOR_TYPE_BUBBLE). 39 // the screen away from the tray (ANCHOR_TYPE_BUBBLE).
41 enum AnchorType { 40 enum AnchorType {
42 ANCHOR_TYPE_TRAY, 41 ANCHOR_TYPE_TRAY,
43 ANCHOR_TYPE_BUBBLE, 42 ANCHOR_TYPE_BUBBLE,
44 }; 43 };
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 199
201 // Used to find any mouse movements. 200 // Used to find any mouse movements.
202 scoped_ptr<MouseWatcher> mouse_watcher_; 201 scoped_ptr<MouseWatcher> mouse_watcher_;
203 202
204 DISALLOW_COPY_AND_ASSIGN(TrayBubbleView); 203 DISALLOW_COPY_AND_ASSIGN(TrayBubbleView);
205 }; 204 };
206 205
207 } // namespace views 206 } // namespace views
208 207
209 #endif // UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_ 208 #endif // UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_
OLDNEW
« no previous file with comments | « mash/wm/root_window_controller.cc ('k') | ui/views/mus/native_widget_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698