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

Side by Side Diff: ash/first_run/first_run_helper_impl.cc

Issue 26277006: Created ash::FirstRunHelper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 2 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/first_run/first_run_helper_impl.h ('k') | ash/shell.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ash/first_run/first_run_helper_impl.h"
6
7 #include "ash/launcher/launcher.h"
8 #include "ash/shell.h"
9 #include "base/logging.h"
10 #include "ui/app_list/views/app_list_view.h"
11 #include "ui/aura/window.h"
12 #include "ui/gfx/rect.h"
13 #include "ui/views/view.h"
14
15 namespace ash {
16
17 FirstRunHelperImpl::FirstRunHelperImpl() {}
18
19 void FirstRunHelperImpl::OpenAppList() {
20 if (Shell::GetInstance()->GetAppListTargetVisibility())
21 return;
22 Shell::GetInstance()->ToggleAppList(NULL);
23 }
24
25 void FirstRunHelperImpl::CloseAppList() {
26 if (!Shell::GetInstance()->GetAppListTargetVisibility())
27 return;
28 Shell::GetInstance()->ToggleAppList(NULL);
29 }
30
31 gfx::Rect FirstRunHelperImpl::GetLauncherBounds() {
32 ash::Launcher* launcher = ash::Launcher::ForPrimaryDisplay();
33 return launcher->GetVisibleItemsBoundsInScreen();
34 }
35
36 gfx::Rect FirstRunHelperImpl::GetAppListButtonBounds() {
37 ash::Launcher* launcher = ash::Launcher::ForPrimaryDisplay();
38 views::View* app_button = launcher->GetAppListButtonView();
39 return app_button->GetBoundsInScreen();
40 }
41
42 gfx::Rect FirstRunHelperImpl::GetAppListBounds() {
43 app_list::AppListView* view = Shell::GetInstance()->GetAppListView();
44 CHECK(view);
45 return view->GetBoundsInScreen();
46 }
47
48 } // namespace ash
49
OLDNEW
« no previous file with comments | « ash/first_run/first_run_helper_impl.h ('k') | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698