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

Side by Side Diff: ash/system/network/tray_network.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 | « no previous file | ash/system/tray/system_tray_widget_delegate.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/network/tray_network.h" 5 #include "ash/system/network/tray_network.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "ash/system/tray/system_tray.h" 9 #include "ash/system/tray/system_tray.h"
10 #include "ash/system/tray/system_tray_delegate.h" 10 #include "ash/system/tray/system_tray_delegate.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 } 62 }
63 63
64 // A bubble that cannot be activated. 64 // A bubble that cannot be activated.
65 class NonActivatableSettingsBubble : public views::BubbleDelegateView { 65 class NonActivatableSettingsBubble : public views::BubbleDelegateView {
66 public: 66 public:
67 NonActivatableSettingsBubble(views::View* anchor, views::View* content) 67 NonActivatableSettingsBubble(views::View* anchor, views::View* content)
68 : views::BubbleDelegateView(anchor, views::BubbleBorder::TOP_RIGHT) { 68 : views::BubbleDelegateView(anchor, views::BubbleBorder::TOP_RIGHT) {
69 set_use_focusless(true); 69 set_use_focusless(true);
70 set_parent_window(ash::Shell::GetInstance()->GetContainer( 70 set_parent_window(ash::Shell::GetInstance()->GetContainer(
71 ash::internal::kShellWindowId_SettingBubbleContainer)); 71 ash::internal::kShellWindowId_SettingBubbleContainer));
72 set_close_on_deactivate(false);
72 SetLayoutManager(new views::FillLayout()); 73 SetLayoutManager(new views::FillLayout());
73 AddChildView(content); 74 AddChildView(content);
74 } 75 }
75 76
76 virtual ~NonActivatableSettingsBubble() {} 77 virtual ~NonActivatableSettingsBubble() {}
77 78
78 virtual bool CanActivate() const OVERRIDE { 79 virtual bool CanActivate() const OVERRIDE {
79 return false; 80 return false;
80 } 81 }
81 82
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 if (tray_) 561 if (tray_)
561 tray_->Update(info); 562 tray_->Update(info);
562 if (default_) 563 if (default_)
563 default_->Update(); 564 default_->Update();
564 if (detailed_) 565 if (detailed_)
565 detailed_->Update(); 566 detailed_->Update();
566 } 567 }
567 568
568 } // namespace internal 569 } // namespace internal
569 } // namespace ash 570 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/system/tray/system_tray_widget_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698