| Index: ash/first_run/first_run_helper_impl.cc
|
| diff --git a/ash/first_run/first_run_helper_impl.cc b/ash/first_run/first_run_helper_impl.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..7ef16a516fe9a3d22ecbe1c68a7879df3e4a18c1
|
| --- /dev/null
|
| +++ b/ash/first_run/first_run_helper_impl.cc
|
| @@ -0,0 +1,49 @@
|
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "ash/first_run/first_run_helper_impl.h"
|
| +
|
| +#include "ash/launcher/launcher.h"
|
| +#include "ash/shell.h"
|
| +#include "base/logging.h"
|
| +#include "ui/app_list/views/app_list_view.h"
|
| +#include "ui/aura/window.h"
|
| +#include "ui/gfx/rect.h"
|
| +#include "ui/views/view.h"
|
| +
|
| +namespace ash {
|
| +
|
| +FirstRunHelperImpl::FirstRunHelperImpl() {}
|
| +
|
| +void FirstRunHelperImpl::OpenAppList() {
|
| + if (Shell::GetInstance()->GetAppListTargetVisibility())
|
| + return;
|
| + Shell::GetInstance()->ToggleAppList(NULL);
|
| +}
|
| +
|
| +void FirstRunHelperImpl::CloseAppList() {
|
| + if (!Shell::GetInstance()->GetAppListTargetVisibility())
|
| + return;
|
| + Shell::GetInstance()->ToggleAppList(NULL);
|
| +}
|
| +
|
| +gfx::Rect FirstRunHelperImpl::GetLauncherBounds() {
|
| + ash::Launcher* launcher = ash::Launcher::ForPrimaryDisplay();
|
| + return launcher->GetVisibleItemsBoundsInScreen();
|
| +}
|
| +
|
| +gfx::Rect FirstRunHelperImpl::GetAppListButtonBounds() {
|
| + ash::Launcher* launcher = ash::Launcher::ForPrimaryDisplay();
|
| + views::View* app_button = launcher->GetAppListButtonView();
|
| + return app_button->GetBoundsInScreen();
|
| +}
|
| +
|
| +gfx::Rect FirstRunHelperImpl::GetAppListBounds() {
|
| + app_list::AppListView* view = Shell::GetInstance()->GetAppListView();
|
| + CHECK(view);
|
| + return view->GetBoundsInScreen();
|
| +}
|
| +
|
| +} // namespace ash
|
| +
|
|
|