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

Side by Side Diff: ash/system/tray/system_tray_widget_delegate.cc

Issue 10383234: views: Do not set capture on a widget if it cannot be activated. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: self-nit Created 8 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 | Annotate | Revision Log
« no previous file with comments | « ash/system/network/tray_network.cc ('k') | ui/views/widget/widget.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/system/tray/system_tray_widget_delegate.h" 5 #include "ash/system/tray/system_tray_widget_delegate.h"
6 6
7 #include "ash/ash_export.h" 7 #include "ash/ash_export.h"
8 #include "ash/focus_cycler.h" 8 #include "ash/focus_cycler.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_window_ids.h" 10 #include "ash/shell_window_ids.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 const views::Widget* StatusAreaView::GetWidget() const { 53 const views::Widget* StatusAreaView::GetWidget() const {
54 return View::GetWidget(); 54 return View::GetWidget();
55 } 55 }
56 56
57 bool StatusAreaView::CanActivate() const { 57 bool StatusAreaView::CanActivate() const {
58 // We don't want mouse clicks to activate us, but we need to allow 58 // We don't want mouse clicks to activate us, but we need to allow
59 // activation when the user is using the keyboard (FocusCycler). 59 // activation when the user is using the keyboard (FocusCycler).
60 const FocusCycler* focus_cycler = focus_cycler_for_testing_ ? 60 const FocusCycler* focus_cycler = focus_cycler_for_testing_ ?
61 focus_cycler_for_testing_ : Shell::GetInstance()->focus_cycler(); 61 focus_cycler_for_testing_ : Shell::GetInstance()->focus_cycler();
62 return focus_cycler->widget_activating() == GetWidget(); 62 return focus_cycler && focus_cycler->widget_activating() == GetWidget();
63 } 63 }
64 64
65 void StatusAreaView::DeleteDelegate() { 65 void StatusAreaView::DeleteDelegate() {
66 } 66 }
67 67
68 } // namespace internal 68 } // namespace internal
69 } // namespace ash 69 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/network/tray_network.cc ('k') | ui/views/widget/widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698