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

Side by Side Diff: ui/views/mus/desktop_window_tree_host_mus.cc

Issue 2739213003: aura-mus: wire up drag and drop. (Closed)
Patch Set: sky comments Created 3 years, 9 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/mus/window_tree_client.cc ('k') | ui/views/mus/mus_client.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/mus/desktop_window_tree_host_mus.h" 5 #include "ui/views/mus/desktop_window_tree_host_mus.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 // which is owned by the window manager. This way the window manager can 300 // which is owned by the window manager. This way the window manager can
301 // properly identify and honor transients. 301 // properly identify and honor transients.
302 if (params.parent && params.parent->GetHost()) { 302 if (params.parent && params.parent->GetHost()) {
303 aura::client::GetTransientWindowClient()->AddTransientChild( 303 aura::client::GetTransientWindowClient()->AddTransientChild(
304 params.parent->GetHost()->window(), window()); 304 params.parent->GetHost()->window(), window());
305 } 305 }
306 306
307 if (!params.accept_events) { 307 if (!params.accept_events) {
308 aura::WindowPortMus::Get(window())->SetEventTargetingPolicy( 308 aura::WindowPortMus::Get(window())->SetEventTargetingPolicy(
309 ui::mojom::EventTargetingPolicy::NONE); 309 ui::mojom::EventTargetingPolicy::NONE);
310 } else {
311 aura::WindowPortMus::Get(content_window)->SetCanAcceptDrops(true);
310 } 312 }
311 } 313 }
312 314
313 void DesktopWindowTreeHostMus::OnNativeWidgetCreated( 315 void DesktopWindowTreeHostMus::OnNativeWidgetCreated(
314 const Widget::InitParams& params) { 316 const Widget::InitParams& params) {
315 window()->SetName(params.name); 317 window()->SetName(params.name);
316 desktop_native_widget_aura_->content_window()->SetName( 318 desktop_native_widget_aura_->content_window()->SetName(
317 "DesktopNativeWidgetAura - content window"); 319 "DesktopNativeWidgetAura - content window");
318 if (params.parent && params.parent->GetHost()) { 320 if (params.parent && params.parent->GetHost()) {
319 parent_ = static_cast<DesktopWindowTreeHostMus*>(params.parent->GetHost()); 321 parent_ = static_cast<DesktopWindowTreeHostMus*>(params.parent->GetHost());
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 aura::client::FocusClient* focus_client, 815 aura::client::FocusClient* focus_client,
814 aura::Window* window) { 816 aura::Window* window) {
815 if (window == this->window()) { 817 if (window == this->window()) {
816 desktop_native_widget_aura_->HandleActivationChanged(true); 818 desktop_native_widget_aura_->HandleActivationChanged(true);
817 } else if (is_active_) { 819 } else if (is_active_) {
818 desktop_native_widget_aura_->HandleActivationChanged(false); 820 desktop_native_widget_aura_->HandleActivationChanged(false);
819 } 821 }
820 } 822 }
821 823
822 } // namespace views 824 } // namespace views
OLDNEW
« no previous file with comments | « ui/aura/mus/window_tree_client.cc ('k') | ui/views/mus/mus_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698