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/common/shell_window_ids.h" | 7 #include "ash/common/shell_window_ids.h" |
| 8 #include "ash/shelf/app_list_button.h" |
8 #include "ash/shelf/shelf.h" | 9 #include "ash/shelf/shelf.h" |
9 #include "ash/shell.h" | 10 #include "ash/shell.h" |
10 #include "ash/system/tray/system_tray.h" | 11 #include "ash/system/tray/system_tray.h" |
11 #include "base/logging.h" | 12 #include "base/logging.h" |
12 #include "ui/app_list/views/app_list_view.h" | 13 #include "ui/app_list/views/app_list_view.h" |
13 #include "ui/aura/window.h" | 14 #include "ui/aura/window.h" |
14 #include "ui/display/display.h" | 15 #include "ui/display/display.h" |
15 #include "ui/display/screen.h" | 16 #include "ui/display/screen.h" |
16 #include "ui/gfx/geometry/rect.h" | 17 #include "ui/gfx/geometry/rect.h" |
17 #include "ui/views/view.h" | 18 #include "ui/views/view.h" |
(...skipping 28 matching lines...) Expand all Loading... |
46 CloseTrayBubble(); | 47 CloseTrayBubble(); |
47 widget_->Close(); | 48 widget_->Close(); |
48 } | 49 } |
49 | 50 |
50 views::Widget* FirstRunHelperImpl::GetOverlayWidget() { | 51 views::Widget* FirstRunHelperImpl::GetOverlayWidget() { |
51 return widget_; | 52 return widget_; |
52 } | 53 } |
53 | 54 |
54 gfx::Rect FirstRunHelperImpl::GetAppListButtonBounds() { | 55 gfx::Rect FirstRunHelperImpl::GetAppListButtonBounds() { |
55 Shelf* shelf = Shelf::ForPrimaryDisplay(); | 56 Shelf* shelf = Shelf::ForPrimaryDisplay(); |
56 views::View* app_button = shelf->GetAppListButtonView(); | 57 AppListButton* app_button = shelf->GetAppListButton(); |
57 return app_button->GetBoundsInScreen(); | 58 return app_button->GetBoundsInScreen(); |
58 } | 59 } |
59 | 60 |
60 void FirstRunHelperImpl::Cancel() { | 61 void FirstRunHelperImpl::Cancel() { |
61 FOR_EACH_OBSERVER(Observer, observers(), OnCancelled()); | 62 FOR_EACH_OBSERVER(Observer, observers(), OnCancelled()); |
62 } | 63 } |
63 | 64 |
64 bool FirstRunHelperImpl::IsCancelingKeyEvent(ui::KeyEvent* event) { | 65 bool FirstRunHelperImpl::IsCancelingKeyEvent(ui::KeyEvent* event) { |
65 return event->key_code() == ui::VKEY_ESCAPE; | 66 return event->key_code() == ui::VKEY_ESCAPE; |
66 } | 67 } |
(...skipping 24 matching lines...) Expand all Loading... |
91 return bubble->GetBoundsInScreen(); | 92 return bubble->GetBoundsInScreen(); |
92 } | 93 } |
93 | 94 |
94 gfx::Rect FirstRunHelperImpl::GetHelpButtonBounds() { | 95 gfx::Rect FirstRunHelperImpl::GetHelpButtonBounds() { |
95 SystemTray* tray = Shell::GetInstance()->GetPrimarySystemTray(); | 96 SystemTray* tray = Shell::GetInstance()->GetPrimarySystemTray(); |
96 views::View* help_button = tray->GetHelpButtonView(); | 97 views::View* help_button = tray->GetHelpButtonView(); |
97 return help_button->GetBoundsInScreen(); | 98 return help_button->GetBoundsInScreen(); |
98 } | 99 } |
99 | 100 |
100 } // namespace ash | 101 } // namespace ash |
OLD | NEW |