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