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

Side by Side Diff: chrome/browser/ui/views/tabs/tab_drag_controller.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
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 #include "chrome/browser/ui/views/tabs/tab_drag_controller.h" 5 #include "chrome/browser/ui/views/tabs/tab_drag_controller.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <set> 8 #include <set>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 private: 161 private:
162 // ui::EventHandler: 162 // ui::EventHandler:
163 void OnKeyEvent(ui::KeyEvent* key) override { 163 void OnKeyEvent(ui::KeyEvent* key) override {
164 if (key->type() == ui::ET_KEY_PRESSED && 164 if (key->type() == ui::ET_KEY_PRESSED &&
165 key->key_code() == ui::VKEY_ESCAPE) { 165 key->key_code() == ui::VKEY_ESCAPE) {
166 escape_callback_.Run(); 166 escape_callback_.Run();
167 } 167 }
168 } 168 }
169 169
170 base::Closure escape_callback_; 170 base::Closure escape_callback_;
171 scoped_ptr<views::EventMonitor> event_monitor_; 171 std::unique_ptr<views::EventMonitor> event_monitor_;
172 172
173 DISALLOW_COPY_AND_ASSIGN(EscapeTracker); 173 DISALLOW_COPY_AND_ASSIGN(EscapeTracker);
174 }; 174 };
175 175
176 } // namespace 176 } // namespace
177 177
178 TabDragController::TabDragData::TabDragData() 178 TabDragController::TabDragData::TabDragData()
179 : contents(NULL), 179 : contents(NULL),
180 source_model_index(-1), 180 source_model_index(-1),
181 attached_tab(NULL), 181 attached_tab(NULL),
(...skipping 1641 matching lines...) Expand 10 before | Expand all | Expand 10 after
1823 // TODO(pkotwicz): Fix this properly (crbug.com/358482) 1823 // TODO(pkotwicz): Fix this properly (crbug.com/358482)
1824 for (auto* browser : *BrowserList::GetInstance()) { 1824 for (auto* browser : *BrowserList::GetInstance()) {
1825 if (browser->tab_strip_model()->empty()) 1825 if (browser->tab_strip_model()->empty())
1826 exclude.insert(browser->window()->GetNativeWindow()); 1826 exclude.insert(browser->window()->GetNativeWindow());
1827 } 1827 }
1828 #endif 1828 #endif
1829 base::WeakPtr<TabDragController> ref(weak_factory_.GetWeakPtr()); 1829 base::WeakPtr<TabDragController> ref(weak_factory_.GetWeakPtr());
1830 *window = window_finder_->GetLocalProcessWindowAtPoint(screen_point, exclude); 1830 *window = window_finder_->GetLocalProcessWindowAtPoint(screen_point, exclude);
1831 return ref ? Liveness::ALIVE : Liveness::DELETED; 1831 return ref ? Liveness::ALIVE : Liveness::DELETED;
1832 } 1832 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698