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

Side by Side Diff: ui/aura/window_tree_host.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/aura/window_tree_host.h ('k') | ui/aura/window_tree_host_platform.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "ui/aura/window_tree_host.h" 5 #include "ui/aura/window_tree_host.h"
6 6
7 #include "base/thread_task_runner_handle.h" 7 #include "base/thread_task_runner_handle.h"
8 #include "base/trace_event/trace_event.h" 8 #include "base/trace_event/trace_event.h"
9 #include "ui/aura/client/capture_client.h" 9 #include "ui/aura/client/capture_client.h"
10 #include "ui/aura/client/cursor_client.h" 10 #include "ui/aura/client/cursor_client.h"
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 DCHECK(Env::GetInstance()); 243 DCHECK(Env::GetInstance());
244 ui::ContextFactory* context_factory = Env::GetInstance()->context_factory(); 244 ui::ContextFactory* context_factory = Env::GetInstance()->context_factory();
245 DCHECK(context_factory); 245 DCHECK(context_factory);
246 compositor_.reset( 246 compositor_.reset(
247 new ui::Compositor(context_factory, base::ThreadTaskRunnerHandle::Get())); 247 new ui::Compositor(context_factory, base::ThreadTaskRunnerHandle::Get()));
248 if (!dispatcher()) { 248 if (!dispatcher()) {
249 window()->Init(ui::LAYER_NOT_DRAWN); 249 window()->Init(ui::LAYER_NOT_DRAWN);
250 window()->set_host(this); 250 window()->set_host(this);
251 window()->SetName("RootWindow"); 251 window()->SetName("RootWindow");
252 window()->SetEventTargeter( 252 window()->SetEventTargeter(
253 scoped_ptr<ui::EventTargeter>(new WindowTargeter())); 253 std::unique_ptr<ui::EventTargeter>(new WindowTargeter()));
254 dispatcher_.reset(new WindowEventDispatcher(this)); 254 dispatcher_.reset(new WindowEventDispatcher(this));
255 } 255 }
256 } 256 }
257 257
258 void WindowTreeHost::OnAcceleratedWidgetAvailable() { 258 void WindowTreeHost::OnAcceleratedWidgetAvailable() {
259 compositor_->SetAcceleratedWidget(GetAcceleratedWidget()); 259 compositor_->SetAcceleratedWidget(GetAcceleratedWidget());
260 prop_.reset(new ui::ViewProp(GetAcceleratedWidget(), 260 prop_.reset(new ui::ViewProp(GetAcceleratedWidget(),
261 kWindowTreeHostForAcceleratedWidget, this)); 261 kWindowTreeHostForAcceleratedWidget, this));
262 } 262 }
263 263
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 client::CursorClient* cursor_client = client::GetCursorClient(window()); 314 client::CursorClient* cursor_client = client::GetCursorClient(window());
315 if (cursor_client) { 315 if (cursor_client) {
316 const gfx::Display& display = 316 const gfx::Display& display =
317 gfx::Screen::GetScreen()->GetDisplayNearestWindow(window()); 317 gfx::Screen::GetScreen()->GetDisplayNearestWindow(window());
318 cursor_client->SetDisplay(display); 318 cursor_client->SetDisplay(display);
319 } 319 }
320 dispatcher()->OnCursorMovedToRootLocation(root_location); 320 dispatcher()->OnCursorMovedToRootLocation(root_location);
321 } 321 }
322 322
323 } // namespace aura 323 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/window_tree_host.h ('k') | ui/aura/window_tree_host_platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698