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

Unified Diff: ash/host/ash_window_tree_host_unified.cc

Issue 1867223004: Convert //ash from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: ash/host/ash_window_tree_host_unified.cc
diff --git a/ash/host/ash_window_tree_host_unified.cc b/ash/host/ash_window_tree_host_unified.cc
index 821a9a7c403dc89aa99a0a341010f85c11ae9984..7f6869b498b7162c232a92eda26c8eac6b0c7daf 100644
--- a/ash/host/ash_window_tree_host_unified.cc
+++ b/ash/host/ash_window_tree_host_unified.cc
@@ -9,6 +9,7 @@
#include "ash/host/root_window_transformer.h"
#include "ash/ime/input_method_event_handler.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/aura/window_targeter.h"
@@ -49,7 +50,7 @@ class UnifiedEventTargeter : public aura::WindowTargeter {
AshWindowTreeHostUnified::AshWindowTreeHostUnified(
const gfx::Rect& initial_bounds)
: AshWindowTreeHostPlatform() {
- scoped_ptr<ui::PlatformWindow> window(new ui::StubWindow(this));
+ std::unique_ptr<ui::PlatformWindow> window(new ui::StubWindow(this));
window->SetBounds(initial_bounds);
SetPlatformWindow(std::move(window));
}
@@ -70,7 +71,7 @@ void AshWindowTreeHostUnified::RegisterMirroringHost(
AshWindowTreeHost* mirroring_ash_host) {
aura::Window* src_root = mirroring_ash_host->AsWindowTreeHost()->window();
src_root->SetEventTargeter(
- make_scoped_ptr(new UnifiedEventTargeter(src_root, window())));
+ base::WrapUnique(new UnifiedEventTargeter(src_root, window())));
DCHECK(std::find(mirroring_hosts_.begin(), mirroring_hosts_.end(),
mirroring_ash_host) == mirroring_hosts_.end());
mirroring_hosts_.push_back(mirroring_ash_host);

Powered by Google App Engine
This is Rietveld 408576698