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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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() { |
54 if (Shell::GetInstance()->GetAppListTargetVisibility()) | 54 Shell::GetInstance()->ShowAppList(NULL); |
55 return; | |
56 Shell::GetInstance()->ToggleAppList(NULL); | |
57 } | 55 } |
58 | 56 |
59 void FirstRunHelperImpl::CloseAppList() { | 57 void FirstRunHelperImpl::CloseAppList() { |
60 if (!Shell::GetInstance()->GetAppListTargetVisibility()) | 58 Shell::GetInstance()->DismissAppList(); |
61 return; | |
62 Shell::GetInstance()->ToggleAppList(NULL); | |
63 } | 59 } |
64 | 60 |
65 gfx::Rect FirstRunHelperImpl::GetLauncherBounds() { | 61 gfx::Rect FirstRunHelperImpl::GetLauncherBounds() { |
66 Shelf* shelf = Shelf::ForPrimaryDisplay(); | 62 Shelf* shelf = Shelf::ForPrimaryDisplay(); |
67 return shelf->GetVisibleItemsBoundsInScreen(); | 63 return shelf->GetVisibleItemsBoundsInScreen(); |
68 } | 64 } |
69 | 65 |
70 gfx::Rect FirstRunHelperImpl::GetAppListButtonBounds() { | 66 gfx::Rect FirstRunHelperImpl::GetAppListButtonBounds() { |
71 Shelf* shelf = Shelf::ForPrimaryDisplay(); | 67 Shelf* shelf = Shelf::ForPrimaryDisplay(); |
72 views::View* app_button = shelf->GetAppListButtonView(); | 68 views::View* app_button = shelf->GetAppListButtonView(); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 return bubble->GetBoundsInScreen(); | 108 return bubble->GetBoundsInScreen(); |
113 } | 109 } |
114 | 110 |
115 gfx::Rect FirstRunHelperImpl::GetHelpButtonBounds() { | 111 gfx::Rect FirstRunHelperImpl::GetHelpButtonBounds() { |
116 SystemTray* tray = Shell::GetInstance()->GetPrimarySystemTray(); | 112 SystemTray* tray = Shell::GetInstance()->GetPrimarySystemTray(); |
117 views::View* help_button = tray->GetHelpButtonView(); | 113 views::View* help_button = tray->GetHelpButtonView(); |
118 return help_button->GetBoundsInScreen(); | 114 return help_button->GetBoundsInScreen(); |
119 } | 115 } |
120 | 116 |
121 } // namespace ash | 117 } // namespace ash |
OLD | NEW |