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

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

Issue 1863523006: mash: Make system tray bubble close when another window is activated (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments 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/views/bubble/tray_bubble_view.h ('k') | ui/views/mus/native_widget_mus_unittest.cc » ('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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 void NativeWidgetMus::OnActivationChanged(bool active) { 318 void NativeWidgetMus::OnActivationChanged(bool active) {
319 if (!native_widget_delegate_) 319 if (!native_widget_delegate_)
320 return; 320 return;
321 if (active) { 321 if (active) {
322 native_widget_delegate_->OnNativeFocus(); 322 native_widget_delegate_->OnNativeFocus();
323 GetWidget()->GetFocusManager()->RestoreFocusedView(); 323 GetWidget()->GetFocusManager()->RestoreFocusedView();
324 } else { 324 } else {
325 native_widget_delegate_->OnNativeBlur(); 325 native_widget_delegate_->OnNativeBlur();
326 GetWidget()->GetFocusManager()->StoreFocusedView(true); 326 GetWidget()->GetFocusManager()->StoreFocusedView(true);
327 } 327 }
328 native_widget_delegate_->OnNativeWidgetActivationChanged(active);
328 } 329 }
329 330
330 void NativeWidgetMus::UpdateClientArea() { 331 void NativeWidgetMus::UpdateClientArea() {
331 NonClientView* non_client_view = 332 NonClientView* non_client_view =
332 native_widget_delegate_->AsWidget()->non_client_view(); 333 native_widget_delegate_->AsWidget()->non_client_view();
333 if (!non_client_view || !non_client_view->client_view()) 334 if (!non_client_view || !non_client_view->client_view())
334 return; 335 return;
335 336
336 const gfx::Rect client_area_rect(non_client_view->client_view()->bounds()); 337 const gfx::Rect client_area_rect(non_client_view->client_view()->bounds());
337 window_->SetClientArea(gfx::Insets( 338 window_->SetClientArea(gfx::Insets(
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 window_tree_host_->Show(); 1006 window_tree_host_->Show();
1006 GetNativeWindow()->Show(); 1007 GetNativeWindow()->Show();
1007 } else { 1008 } else {
1008 window_tree_host_->Hide(); 1009 window_tree_host_->Hide();
1009 GetNativeWindow()->Hide(); 1010 GetNativeWindow()->Hide();
1010 } 1011 }
1011 native_widget_delegate_->OnNativeWidgetVisibilityChanged(window->visible()); 1012 native_widget_delegate_->OnNativeWidgetVisibilityChanged(window->visible());
1012 } 1013 }
1013 1014
1014 } // namespace views 1015 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/bubble/tray_bubble_view.h ('k') | ui/views/mus/native_widget_mus_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698