Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 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 "chrome/browser/ui/ash/launcher/chrome_launcher_controller_mus.h" | |
| 6 | |
| 7 #include "chrome/browser/profiles/profile_manager.h" | |
| 8 #include "chrome/browser/ui/ash/launcher/chrome_mash_shelf_controller.h" | |
| 9 | |
| 10 // static | |
| 11 ChromeLauncherController* ChromeLauncherControllerMus::CreateInstance() { | |
| 12 DCHECK(!ChromeLauncherController::instance()); | |
| 13 ChromeLauncherControllerMus* instance = new ChromeLauncherControllerMus(); | |
|
msw
2016/06/13 21:01:22
Perhaps this should call Init() on the new instanc
mfomitchev
2016/06/13 21:33:31
I added it into InitializeMash(). ChromeLauncherCo
| |
| 14 ChromeLauncherController::set_instance(instance); | |
| 15 return instance; | |
| 16 } | |
| 17 | |
| 18 ChromeLauncherControllerMus::ChromeLauncherControllerMus() | |
| 19 : shelf_controller_(new ChromeMashShelfController) {} | |
| 20 | |
| 21 ChromeLauncherControllerMus::~ChromeLauncherControllerMus() {} | |
| 22 | |
| 23 void ChromeLauncherControllerMus::Init() {} | |
| 24 | |
| 25 ash::ShelfID ChromeLauncherControllerMus::CreateAppLauncherItem( | |
| 26 LauncherItemController* controller, | |
| 27 const std::string& app_id, | |
| 28 ash::ShelfItemStatus status) { | |
| 29 NOTIMPLEMENTED(); | |
| 30 return ash::TYPE_UNDEFINED; | |
| 31 } | |
| 32 | |
| 33 void ChromeLauncherControllerMus::SetItemStatus(ash::ShelfID id, | |
| 34 ash::ShelfItemStatus status) { | |
| 35 NOTIMPLEMENTED(); | |
| 36 } | |
| 37 | |
| 38 void ChromeLauncherControllerMus::SetItemController( | |
| 39 ash::ShelfID id, | |
| 40 LauncherItemController* controller) { | |
| 41 NOTIMPLEMENTED(); | |
| 42 } | |
| 43 | |
| 44 void ChromeLauncherControllerMus::CloseLauncherItem(ash::ShelfID id) { | |
| 45 NOTIMPLEMENTED(); | |
| 46 } | |
| 47 | |
| 48 void ChromeLauncherControllerMus::Pin(ash::ShelfID id) { | |
| 49 NOTIMPLEMENTED(); | |
| 50 } | |
| 51 | |
| 52 void ChromeLauncherControllerMus::Unpin(ash::ShelfID id) { | |
| 53 NOTIMPLEMENTED(); | |
| 54 } | |
| 55 | |
| 56 bool ChromeLauncherControllerMus::IsPinned(ash::ShelfID id) { | |
| 57 NOTIMPLEMENTED(); | |
| 58 return false; | |
| 59 } | |
| 60 | |
| 61 void ChromeLauncherControllerMus::TogglePinned(ash::ShelfID id) { | |
| 62 NOTIMPLEMENTED(); | |
| 63 } | |
| 64 | |
| 65 bool ChromeLauncherControllerMus::IsPinnable(ash::ShelfID id) const { | |
| 66 NOTIMPLEMENTED(); | |
| 67 return false; | |
| 68 } | |
| 69 | |
| 70 void ChromeLauncherControllerMus::LockV1AppWithID(const std::string& app_id) { | |
| 71 NOTIMPLEMENTED(); | |
| 72 } | |
| 73 | |
| 74 void ChromeLauncherControllerMus::UnlockV1AppWithID(const std::string& app_id) { | |
| 75 NOTIMPLEMENTED(); | |
| 76 } | |
| 77 | |
| 78 void ChromeLauncherControllerMus::Launch(ash::ShelfID id, int event_flags) { | |
| 79 NOTIMPLEMENTED(); | |
| 80 } | |
| 81 | |
| 82 void ChromeLauncherControllerMus::Close(ash::ShelfID id) { | |
| 83 NOTIMPLEMENTED(); | |
| 84 } | |
| 85 | |
| 86 bool ChromeLauncherControllerMus::IsOpen(ash::ShelfID id) { | |
| 87 NOTIMPLEMENTED(); | |
| 88 return false; | |
| 89 } | |
| 90 | |
| 91 bool ChromeLauncherControllerMus::IsPlatformApp(ash::ShelfID id) { | |
| 92 NOTIMPLEMENTED(); | |
| 93 return false; | |
| 94 } | |
| 95 | |
| 96 void ChromeLauncherControllerMus::LaunchApp(const std::string& app_id, | |
| 97 ash::LaunchSource source, | |
| 98 int event_flags) { | |
| 99 shelf_controller_->LaunchItem(app_id); | |
| 100 } | |
| 101 | |
| 102 void ChromeLauncherControllerMus::ActivateApp(const std::string& app_id, | |
| 103 ash::LaunchSource source, | |
| 104 int event_flags) { | |
| 105 NOTIMPLEMENTED(); | |
| 106 } | |
| 107 | |
| 108 extensions::LaunchType ChromeLauncherControllerMus::GetLaunchType( | |
| 109 ash::ShelfID id) { | |
| 110 NOTIMPLEMENTED(); | |
| 111 return extensions::LAUNCH_TYPE_INVALID; | |
| 112 } | |
| 113 | |
| 114 void ChromeLauncherControllerMus::SetLauncherItemImage( | |
| 115 ash::ShelfID shelf_id, | |
| 116 const gfx::ImageSkia& image) { | |
| 117 NOTIMPLEMENTED(); | |
| 118 } | |
| 119 | |
| 120 bool ChromeLauncherControllerMus::IsWindowedAppInLauncher( | |
| 121 const std::string& app_id) { | |
| 122 NOTIMPLEMENTED(); | |
| 123 return false; | |
| 124 } | |
| 125 | |
| 126 void ChromeLauncherControllerMus::SetLaunchType( | |
| 127 ash::ShelfID id, | |
| 128 extensions::LaunchType launch_type) { | |
| 129 NOTIMPLEMENTED(); | |
| 130 } | |
| 131 | |
| 132 void ChromeLauncherControllerMus::PersistPinnedState() { | |
| 133 NOTIMPLEMENTED(); | |
| 134 } | |
| 135 | |
| 136 Profile* ChromeLauncherControllerMus::GetProfile() { | |
| 137 return ProfileManager::GetActiveUserProfile(); | |
| 138 } | |
| 139 | |
| 140 void ChromeLauncherControllerMus::UpdateAppState(content::WebContents* contents, | |
| 141 AppState app_state) { | |
| 142 NOTIMPLEMENTED(); | |
| 143 } | |
| 144 | |
| 145 ash::ShelfID ChromeLauncherControllerMus::GetShelfIDForWebContents( | |
| 146 content::WebContents* contents) { | |
| 147 NOTIMPLEMENTED(); | |
| 148 return ash::TYPE_UNDEFINED; | |
| 149 } | |
| 150 | |
| 151 void ChromeLauncherControllerMus::SetRefocusURLPatternForTest(ash::ShelfID id, | |
| 152 const GURL& url) { | |
| 153 NOTIMPLEMENTED(); | |
| 154 } | |
| 155 | |
| 156 const extensions::Extension* ChromeLauncherControllerMus::GetExtensionForAppID( | |
| 157 const std::string& app_id) const { | |
| 158 NOTIMPLEMENTED(); | |
| 159 return nullptr; | |
| 160 } | |
| 161 | |
| 162 ash::ShelfItemDelegate::PerformedAction | |
| 163 ChromeLauncherControllerMus::ActivateWindowOrMinimizeIfActive( | |
| 164 ui::BaseWindow* window, | |
| 165 bool allow_minimize) { | |
| 166 NOTIMPLEMENTED(); | |
| 167 return ash::ShelfItemDelegate::kNoAction; | |
| 168 } | |
| 169 | |
| 170 void ChromeLauncherControllerMus::ActiveUserChanged( | |
| 171 const std::string& user_email) { | |
| 172 NOTIMPLEMENTED(); | |
| 173 } | |
| 174 | |
| 175 void ChromeLauncherControllerMus::AdditionalUserAddedToSession( | |
| 176 Profile* profile) { | |
| 177 NOTIMPLEMENTED(); | |
| 178 } | |
| 179 | |
| 180 ChromeLauncherAppMenuItems ChromeLauncherControllerMus::GetApplicationList( | |
| 181 const ash::ShelfItem& item, | |
| 182 int event_flags) { | |
| 183 NOTIMPLEMENTED(); | |
| 184 return ChromeLauncherAppMenuItems(); | |
| 185 } | |
| 186 | |
| 187 std::vector<content::WebContents*> | |
| 188 ChromeLauncherControllerMus::GetV1ApplicationsFromAppId( | |
| 189 const std::string& app_id) { | |
| 190 NOTIMPLEMENTED(); | |
| 191 return std::vector<content::WebContents*>(); | |
| 192 } | |
| 193 | |
| 194 void ChromeLauncherControllerMus::ActivateShellApp(const std::string& app_id, | |
| 195 int index) { | |
| 196 NOTIMPLEMENTED(); | |
| 197 } | |
| 198 | |
| 199 bool ChromeLauncherControllerMus::IsWebContentHandledByApplication( | |
| 200 content::WebContents* web_contents, | |
| 201 const std::string& app_id) { | |
| 202 NOTIMPLEMENTED(); | |
| 203 return false; | |
| 204 } | |
| 205 | |
| 206 bool ChromeLauncherControllerMus::ContentCanBeHandledByGmailApp( | |
| 207 content::WebContents* web_contents) { | |
| 208 NOTIMPLEMENTED(); | |
| 209 return false; | |
| 210 } | |
| 211 | |
| 212 gfx::Image ChromeLauncherControllerMus::GetAppListIcon( | |
| 213 content::WebContents* web_contents) const { | |
| 214 NOTIMPLEMENTED(); | |
| 215 return gfx::Image(); | |
| 216 } | |
| 217 | |
| 218 base::string16 ChromeLauncherControllerMus::GetAppListTitle( | |
| 219 content::WebContents* web_contents) const { | |
| 220 NOTIMPLEMENTED(); | |
| 221 return base::string16(); | |
| 222 } | |
| 223 | |
| 224 BrowserShortcutLauncherItemController* | |
| 225 ChromeLauncherControllerMus::GetBrowserShortcutLauncherItemController() { | |
| 226 NOTIMPLEMENTED(); | |
| 227 return nullptr; | |
| 228 } | |
| 229 | |
| 230 LauncherItemController* ChromeLauncherControllerMus::GetLauncherItemController( | |
| 231 const ash::ShelfID id) { | |
| 232 NOTIMPLEMENTED(); | |
| 233 return nullptr; | |
| 234 } | |
| 235 | |
| 236 bool ChromeLauncherControllerMus::IsBrowserFromActiveUser(Browser* browser) { | |
| 237 NOTIMPLEMENTED(); | |
| 238 return false; | |
| 239 } | |
| 240 | |
| 241 bool ChromeLauncherControllerMus::ShelfBoundsChangesProbablyWithUser( | |
| 242 ash::Shelf* shelf, | |
| 243 const std::string& user_id) const { | |
| 244 NOTIMPLEMENTED(); | |
| 245 return false; | |
| 246 } | |
| 247 | |
| 248 void ChromeLauncherControllerMus::OnUserProfileReadyToSwitch(Profile* profile) { | |
| 249 NOTIMPLEMENTED(); | |
| 250 } | |
| 251 | |
| 252 AppListControllerDelegate::Pinnable ChromeLauncherControllerMus::GetPinnable( | |
| 253 const std::string& app_id) { | |
| 254 NOTIMPLEMENTED(); | |
| 255 return AppListControllerDelegate::NO_PIN; | |
| 256 } | |
| 257 | |
| 258 ArcAppDeferredLauncherController* | |
| 259 ChromeLauncherControllerMus::GetArcDeferredLauncher() { | |
| 260 NOTIMPLEMENTED(); | |
| 261 return nullptr; | |
| 262 } | |
| OLD | NEW |