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

Side by Side Diff: ash/common/shelf/overflow_bubble.cc

Issue 2235363003: Wires up WmShellMus::Add/RemovePointerWatcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pointer_watcher_capture
Patch Set: cleanup Created 4 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
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 #include "ash/common/shelf/overflow_bubble.h" 5 #include "ash/common/shelf/overflow_bubble.h"
6 6
7 #include "ash/common/shelf/overflow_bubble_view.h" 7 #include "ash/common/shelf/overflow_bubble_view.h"
8 #include "ash/common/shelf/shelf_view.h" 8 #include "ash/common/shelf/shelf_view.h"
9 #include "ash/common/shelf/wm_shelf.h" 9 #include "ash/common/shelf/wm_shelf.h"
10 #include "ash/common/system/tray/tray_background_view.h" 10 #include "ash/common/system/tray/tray_background_view.h"
11 #include "ash/common/wm_shell.h" 11 #include "ash/common/wm_shell.h"
12 #include "ui/gfx/geometry/rect.h" 12 #include "ui/gfx/geometry/rect.h"
13 #include "ui/views/widget/widget.h" 13 #include "ui/views/widget/widget.h"
14 14
15 namespace ash { 15 namespace ash {
16 16
17 OverflowBubble::OverflowBubble(WmShelf* wm_shelf) 17 OverflowBubble::OverflowBubble(WmShelf* wm_shelf)
18 : wm_shelf_(wm_shelf), 18 : wm_shelf_(wm_shelf),
19 bubble_(nullptr), 19 bubble_(nullptr),
20 anchor_(nullptr), 20 anchor_(nullptr),
21 shelf_view_(nullptr) { 21 shelf_view_(nullptr) {
22 WmShell::Get()->AddPointerWatcher(this); 22 const bool wants_moves = false;
James Cook 2016/08/12 16:08:53 Hooray for giving it a name!
23 WmShell::Get()->AddPointerWatcher(this, wants_moves);
23 } 24 }
24 25
25 OverflowBubble::~OverflowBubble() { 26 OverflowBubble::~OverflowBubble() {
26 Hide(); 27 Hide();
27 WmShell::Get()->RemovePointerWatcher(this); 28 WmShell::Get()->RemovePointerWatcher(this);
28 } 29 }
29 30
30 void OverflowBubble::Show(views::View* anchor, ShelfView* shelf_view) { 31 void OverflowBubble::Show(views::View* anchor, ShelfView* shelf_view) {
31 Hide(); 32 Hide();
32 33
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 82
82 void OverflowBubble::OnWidgetDestroying(views::Widget* widget) { 83 void OverflowBubble::OnWidgetDestroying(views::Widget* widget) {
83 DCHECK(widget == bubble_->GetWidget()); 84 DCHECK(widget == bubble_->GetWidget());
84 bubble_ = NULL; 85 bubble_ = NULL;
85 anchor_ = NULL; 86 anchor_ = NULL;
86 wm_shelf_->SchedulePaint(); 87 wm_shelf_->SchedulePaint();
87 shelf_view_ = NULL; 88 shelf_view_ = NULL;
88 } 89 }
89 90
90 } // namespace ash 91 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698