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

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

Issue 1949823002: WIP: Eliminate event.target() usage from TrayEventFilter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: container delegate Created 4 years, 7 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/mus/native_widget_mus.h ('k') | ui/views/mus/window_manager_connection.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/native_widget_mus.h" 5 #include "ui/views/mus/native_widget_mus.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/thread_task_runner_handle.h" 8 #include "base/thread_task_runner_handle.h"
9 #include "components/mus/public/cpp/property_type_converters.h" 9 #include "components/mus/public/cpp/property_type_converters.h"
10 #include "components/mus/public/cpp/window.h" 10 #include "components/mus/public/cpp/window.h"
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 NativeWidgetMus* native_widget = 370 NativeWidgetMus* native_widget =
371 window->GetLocalProperty(kNativeWidgetMusKey); 371 window->GetLocalProperty(kNativeWidgetMusKey);
372 if (native_widget && native_widget->GetWidget()->non_client_view()) { 372 if (native_widget && native_widget->GetWidget()->non_client_view()) {
373 native_widget->GetWidget()->non_client_view()->Layout(); 373 native_widget->GetWidget()->non_client_view()->Layout();
374 native_widget->GetWidget()->non_client_view()->SchedulePaint(); 374 native_widget->GetWidget()->non_client_view()->SchedulePaint();
375 native_widget->UpdateClientArea(); 375 native_widget->UpdateClientArea();
376 } 376 }
377 } 377 }
378 } 378 }
379 379
380 // static
381 Widget* NativeWidgetMus::GetWidgetForWindow(mus::Window* window) {
382 if (!window)
383 return nullptr;
384 NativeWidgetMus* native_widget = window->GetLocalProperty(kNativeWidgetMusKey) ;
385 if (!native_widget)
386 return nullptr;
387 return native_widget->GetWidget();
388 }
389
380 aura::Window* NativeWidgetMus::GetRootWindow() { 390 aura::Window* NativeWidgetMus::GetRootWindow() {
381 return window_tree_host_->window(); 391 return window_tree_host_->window();
382 } 392 }
383 393
384 void NativeWidgetMus::OnPlatformWindowClosed() { 394 void NativeWidgetMus::OnPlatformWindowClosed() {
385 native_widget_delegate_->OnNativeWidgetDestroying(); 395 native_widget_delegate_->OnNativeWidgetDestroying();
386 396
387 window_tree_client_.reset(); // Uses |content_|. 397 window_tree_client_.reset(); // Uses |content_|.
388 capture_client_.reset(); // Uses |content_|. 398 capture_client_.reset(); // Uses |content_|.
389 399
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 window_tree_host_->Show(); 1131 window_tree_host_->Show();
1122 GetNativeWindow()->Show(); 1132 GetNativeWindow()->Show();
1123 } else { 1133 } else {
1124 window_tree_host_->Hide(); 1134 window_tree_host_->Hide();
1125 GetNativeWindow()->Hide(); 1135 GetNativeWindow()->Hide();
1126 } 1136 }
1127 native_widget_delegate_->OnNativeWidgetVisibilityChanged(window->visible()); 1137 native_widget_delegate_->OnNativeWidgetVisibilityChanged(window->visible());
1128 } 1138 }
1129 1139
1130 } // namespace views 1140 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/mus/native_widget_mus.h ('k') | ui/views/mus/window_manager_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698