| 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 "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h" | 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 850 // Creates app window and set optional Arc application id. | 850 // Creates app window and set optional Arc application id. |
| 851 views::Widget* CreateArcWindow(std::string& window_app_id) { | 851 views::Widget* CreateArcWindow(std::string& window_app_id) { |
| 852 views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW); | 852 views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW); |
| 853 params.bounds = gfx::Rect(5, 5, 20, 20); | 853 params.bounds = gfx::Rect(5, 5, 20, 20); |
| 854 params.context = GetContext(); | 854 params.context = GetContext(); |
| 855 views::Widget* widget = new views::Widget(); | 855 views::Widget* widget = new views::Widget(); |
| 856 widget->Init(params); | 856 widget->Init(params); |
| 857 // Set Arc id before showing the window to be recognized in | 857 // Set Arc id before showing the window to be recognized in |
| 858 // ArcAppWindowLauncherController. | 858 // ArcAppWindowLauncherController. |
| 859 exo::ShellSurface::SetApplicationId(widget->GetNativeWindow(), | 859 exo::ShellSurface::SetApplicationId(widget->GetNativeWindow(), |
| 860 &window_app_id); | 860 window_app_id); |
| 861 widget->Show(); | 861 widget->Show(); |
| 862 widget->Activate(); | 862 widget->Activate(); |
| 863 return widget; | 863 return widget; |
| 864 } | 864 } |
| 865 | 865 |
| 866 arc::mojom::AppInfo CreateAppInfo(const std::string& name, | 866 arc::mojom::AppInfo CreateAppInfo(const std::string& name, |
| 867 const std::string& activity, | 867 const std::string& activity, |
| 868 const std::string& package_name, | 868 const std::string& package_name, |
| 869 OrientationLock lock) { | 869 OrientationLock lock) { |
| 870 arc::mojom::AppInfo appinfo; | 870 arc::mojom::AppInfo appinfo; |
| (...skipping 3173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4044 | 4044 |
| 4045 // Pinned state should not change. | 4045 // Pinned state should not change. |
| 4046 EXPECT_EQ("AppList, Chrome, App1, App2", GetPinnedAppStatus()); | 4046 EXPECT_EQ("AppList, Chrome, App1, App2", GetPinnedAppStatus()); |
| 4047 launcher_controller_->UnpinAppWithID(extension2_->id()); | 4047 launcher_controller_->UnpinAppWithID(extension2_->id()); |
| 4048 EXPECT_EQ("AppList, Chrome, App1", GetPinnedAppStatus()); | 4048 EXPECT_EQ("AppList, Chrome, App1", GetPinnedAppStatus()); |
| 4049 | 4049 |
| 4050 // Resume syncing and sync information overrides local copy. | 4050 // Resume syncing and sync information overrides local copy. |
| 4051 StartAppSyncService(copy_sync_list); | 4051 StartAppSyncService(copy_sync_list); |
| 4052 EXPECT_EQ("AppList, Chrome, App1, App2", GetPinnedAppStatus()); | 4052 EXPECT_EQ("AppList, Chrome, App1, App2", GetPinnedAppStatus()); |
| 4053 } | 4053 } |
| OLD | NEW |