OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/first_run/first_run_helper_impl.h" | 5 #include "ash/first_run/first_run_helper_impl.h" |
6 | 6 |
7 #include "ash/shelf/shelf.h" | 7 #include "ash/shelf/shelf.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
10 #include "ash/system/tray/system_tray.h" | 10 #include "ash/system/tray/system_tray.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 } | 33 } |
34 | 34 |
35 } // anonymous namespace | 35 } // anonymous namespace |
36 | 36 |
37 FirstRunHelperImpl::FirstRunHelperImpl() | 37 FirstRunHelperImpl::FirstRunHelperImpl() |
38 : widget_(CreateFirstRunWindow()) { | 38 : widget_(CreateFirstRunWindow()) { |
39 Shell::GetInstance()->overlay_filter()->Activate(this); | 39 Shell::GetInstance()->overlay_filter()->Activate(this); |
40 } | 40 } |
41 | 41 |
42 FirstRunHelperImpl::~FirstRunHelperImpl() { | 42 FirstRunHelperImpl::~FirstRunHelperImpl() { |
43 Shell::GetInstance()->overlay_filter()->Deactivate(); | 43 Shell::GetInstance()->overlay_filter()->Deactivate(this); |
44 if (IsTrayBubbleOpened()) | 44 if (IsTrayBubbleOpened()) |
45 CloseTrayBubble(); | 45 CloseTrayBubble(); |
46 widget_->Close(); | 46 widget_->Close(); |
47 } | 47 } |
48 | 48 |
49 views::Widget* FirstRunHelperImpl::GetOverlayWidget() { | 49 views::Widget* FirstRunHelperImpl::GetOverlayWidget() { |
50 return widget_; | 50 return widget_; |
51 } | 51 } |
52 | 52 |
53 void FirstRunHelperImpl::OpenAppList() { | 53 void FirstRunHelperImpl::OpenAppList() { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 return bubble->GetBoundsInScreen(); | 112 return bubble->GetBoundsInScreen(); |
113 } | 113 } |
114 | 114 |
115 gfx::Rect FirstRunHelperImpl::GetHelpButtonBounds() { | 115 gfx::Rect FirstRunHelperImpl::GetHelpButtonBounds() { |
116 SystemTray* tray = Shell::GetInstance()->GetPrimarySystemTray(); | 116 SystemTray* tray = Shell::GetInstance()->GetPrimarySystemTray(); |
117 views::View* help_button = tray->GetHelpButtonView(); | 117 views::View* help_button = tray->GetHelpButtonView(); |
118 return help_button->GetBoundsInScreen(); | 118 return help_button->GetBoundsInScreen(); |
119 } | 119 } |
120 | 120 |
121 } // namespace ash | 121 } // namespace ash |
OLD | NEW |