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

Side by Side Diff: ui/views/mouse_watcher.cc

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr 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 | « ui/views/mouse_watcher.h ('k') | ui/views/mus/aura_init.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/views/mouse_watcher.h" 5 #include "ui/views/mouse_watcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/event_types.h" 9 #include "base/event_types.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 } 76 }
77 } 77 }
78 78
79 void NotifyListener() { 79 void NotifyListener() {
80 mouse_watcher_->NotifyListener(); 80 mouse_watcher_->NotifyListener();
81 // WARNING: we've been deleted. 81 // WARNING: we've been deleted.
82 } 82 }
83 83
84 private: 84 private:
85 MouseWatcher* mouse_watcher_; 85 MouseWatcher* mouse_watcher_;
86 scoped_ptr<views::EventMonitor> event_monitor_; 86 std::unique_ptr<views::EventMonitor> event_monitor_;
87 87
88 // A factory that is used to construct a delayed callback to the listener. 88 // A factory that is used to construct a delayed callback to the listener.
89 base::WeakPtrFactory<Observer> notify_listener_factory_; 89 base::WeakPtrFactory<Observer> notify_listener_factory_;
90 90
91 DISALLOW_COPY_AND_ASSIGN(Observer); 91 DISALLOW_COPY_AND_ASSIGN(Observer);
92 }; 92 };
93 93
94 MouseWatcherListener::~MouseWatcherListener() { 94 MouseWatcherListener::~MouseWatcherListener() {
95 } 95 }
96 96
(...skipping 19 matching lines...) Expand all
116 void MouseWatcher::Stop() { 116 void MouseWatcher::Stop() {
117 observer_.reset(NULL); 117 observer_.reset(NULL);
118 } 118 }
119 119
120 void MouseWatcher::NotifyListener() { 120 void MouseWatcher::NotifyListener() {
121 observer_.reset(NULL); 121 observer_.reset(NULL);
122 listener_->MouseMovedOutOfHost(); 122 listener_->MouseMovedOutOfHost();
123 } 123 }
124 124
125 } // namespace views 125 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/mouse_watcher.h ('k') | ui/views/mus/aura_init.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698