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

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: rebase 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 =
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 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
1123 window_tree_host_->Show(); 1134 window_tree_host_->Show();
1124 GetNativeWindow()->Show(); 1135 GetNativeWindow()->Show();
1125 } else { 1136 } else {
1126 window_tree_host_->Hide(); 1137 window_tree_host_->Hide();
1127 GetNativeWindow()->Hide(); 1138 GetNativeWindow()->Hide();
1128 } 1139 }
1129 native_widget_delegate_->OnNativeWidgetVisibilityChanged(window->visible()); 1140 native_widget_delegate_->OnNativeWidgetVisibilityChanged(window->visible());
1130 } 1141 }
1131 1142
1132 } // namespace views 1143 } // 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