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

Side by Side Diff: chrome/browser/ui/panels/panel_mouse_watcher.cc

Issue 392013005: [#1] Delete reduntdant 19 header files in ui/gfx (8 of 19 by this) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sorted includes Created 6 years, 5 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/ui/panels/panel_mouse_watcher.h" 5 #include "chrome/browser/ui/panels/panel_mouse_watcher.h"
6 6
7 #include "chrome/browser/ui/panels/panel_mouse_watcher_observer.h" 7 #include "chrome/browser/ui/panels/panel_mouse_watcher_observer.h"
8 #include "ui/gfx/point.h" 8 #include "ui/gfx/geometry/point.h"
9 9
10 PanelMouseWatcher::PanelMouseWatcher() { 10 PanelMouseWatcher::PanelMouseWatcher() {
11 } 11 }
12 12
13 PanelMouseWatcher::~PanelMouseWatcher() { 13 PanelMouseWatcher::~PanelMouseWatcher() {
14 } 14 }
15 15
16 void PanelMouseWatcher::AddObserver(PanelMouseWatcherObserver* observer) { 16 void PanelMouseWatcher::AddObserver(PanelMouseWatcherObserver* observer) {
17 bool already_started = observers_.might_have_observers(); 17 bool already_started = observers_.might_have_observers();
18 observers_.AddObserver(observer); 18 observers_.AddObserver(observer);
19 if (!already_started) 19 if (!already_started)
20 Start(); 20 Start();
21 } 21 }
22 22
23 void PanelMouseWatcher::RemoveObserver(PanelMouseWatcherObserver* observer) { 23 void PanelMouseWatcher::RemoveObserver(PanelMouseWatcherObserver* observer) {
24 DCHECK(observers_.HasObserver(observer)); 24 DCHECK(observers_.HasObserver(observer));
25 observers_.RemoveObserver(observer); 25 observers_.RemoveObserver(observer);
26 if (!observers_.might_have_observers()) 26 if (!observers_.might_have_observers())
27 Stop(); 27 Stop();
28 } 28 }
29 29
30 void PanelMouseWatcher::NotifyMouseMovement(const gfx::Point& mouse_position) { 30 void PanelMouseWatcher::NotifyMouseMovement(const gfx::Point& mouse_position) {
31 FOR_EACH_OBSERVER(PanelMouseWatcherObserver, observers_, 31 FOR_EACH_OBSERVER(PanelMouseWatcherObserver, observers_,
32 OnMouseMove(mouse_position)); 32 OnMouseMove(mouse_position));
33 } 33 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698