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

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

Issue 1957653003: mash: Don't close system tray bubble for clicks in menus/notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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
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 =
385 window->GetLocalProperty(kNativeWidgetMusKey);
386 if (!native_widget)
387 return nullptr;
388 return native_widget->GetWidget();
389 }
390
380 aura::Window* NativeWidgetMus::GetRootWindow() { 391 aura::Window* NativeWidgetMus::GetRootWindow() {
381 return window_tree_host_->window(); 392 return window_tree_host_->window();
382 } 393 }
383 394
384 void NativeWidgetMus::OnPlatformWindowClosed() { 395 void NativeWidgetMus::OnPlatformWindowClosed() {
385 native_widget_delegate_->OnNativeWidgetDestroying(); 396 native_widget_delegate_->OnNativeWidgetDestroying();
386 397
387 window_tree_client_.reset(); // Uses |content_|. 398 window_tree_client_.reset(); // Uses |content_|.
388 capture_client_.reset(); // Uses |content_|. 399 capture_client_.reset(); // Uses |content_|.
389 400
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 window_tree_host_->Show(); 1132 window_tree_host_->Show();
1122 GetNativeWindow()->Show(); 1133 GetNativeWindow()->Show();
1123 } else { 1134 } else {
1124 window_tree_host_->Hide(); 1135 window_tree_host_->Hide();
1125 GetNativeWindow()->Hide(); 1136 GetNativeWindow()->Hide();
1126 } 1137 }
1127 native_widget_delegate_->OnNativeWidgetVisibilityChanged(window->visible()); 1138 native_widget_delegate_->OnNativeWidgetVisibilityChanged(window->visible());
1128 } 1139 }
1129 1140
1130 } // namespace views 1141 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698