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

Side by Side Diff: chrome/browser/ui/ash/launcher/launcher_item_controller.cc

Issue 2290603002: Enhance chrome.app.window API for shelf integration with pinning support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: LauncherItemController Unit Tests Fix after Rebase Created 4 years, 3 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
« no previous file with comments | « chrome/browser/ui/ash/launcher/launcher_item_controller.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/launcher_item_controller.h" 5 #include "chrome/browser/ui/ash/launcher/launcher_item_controller.h"
6 6
7 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" 7 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
8 #include "chrome/common/extensions/extension_constants.h" 8 #include "chrome/common/extensions/extension_constants.h"
9 9
10 LauncherItemController::LauncherItemController( 10 LauncherItemController::LauncherItemController(
11 Type type, 11 Type type,
12 const std::string& app_id, 12 const std::string& app_id,
13 const std::string& launch_id,
13 ChromeLauncherController* launcher_controller) 14 ChromeLauncherController* launcher_controller)
14 : type_(type), 15 : type_(type),
15 app_id_(app_id), 16 app_id_(app_id),
17 launch_id_(launch_id),
16 shelf_id_(0), 18 shelf_id_(0),
17 launcher_controller_(launcher_controller), 19 launcher_controller_(launcher_controller),
18 locked_(0), 20 locked_(0),
19 image_set_by_controller_(false) {} 21 image_set_by_controller_(false) {}
20 22
21 LauncherItemController::~LauncherItemController() {} 23 LauncherItemController::~LauncherItemController() {}
22 24
23 ash::ShelfItemType LauncherItemController::GetShelfItemType() const { 25 ash::ShelfItemType LauncherItemController::GetShelfItemType() const {
24 if (extension_misc::IsImeMenuExtensionId(app_id_)) 26 if (extension_misc::IsImeMenuExtensionId(app_id_))
25 return ash::TYPE_IME_MENU; 27 return ash::TYPE_IME_MENU;
26 28
27 switch (type_) { 29 switch (type_) {
28 case LauncherItemController::TYPE_SHORTCUT: 30 case LauncherItemController::TYPE_SHORTCUT:
29 case LauncherItemController::TYPE_WINDOWED_APP: 31 case LauncherItemController::TYPE_WINDOWED_APP:
30 return ash::TYPE_APP_SHORTCUT; 32 return ash::TYPE_APP_SHORTCUT;
31 case LauncherItemController::TYPE_APP: 33 case LauncherItemController::TYPE_APP:
32 return ash::TYPE_PLATFORM_APP; 34 return ash::TYPE_PLATFORM_APP;
33 case LauncherItemController::TYPE_APP_PANEL: 35 case LauncherItemController::TYPE_APP_PANEL:
34 return ash::TYPE_APP_PANEL; 36 return ash::TYPE_APP_PANEL;
35 } 37 }
36 NOTREACHED(); 38 NOTREACHED();
37 return ash::TYPE_APP_SHORTCUT; 39 return ash::TYPE_APP_SHORTCUT;
38 } 40 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/launcher_item_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698