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

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

Issue 2747983002: arc: Fix crash on deferred app launch. (Closed)
Patch Set: Created 3 years, 9 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
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 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_ITEM_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_ITEM_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_ITEM_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_ITEM_CONTROLLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "ash/common/shelf/shelf_item_types.h" 10 #include "ash/common/shelf/shelf_item_types.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 void set_image_set_by_controller(bool image_set_by_controller) { 49 void set_image_set_by_controller(bool image_set_by_controller) {
50 image_set_by_controller_ = image_set_by_controller; 50 image_set_by_controller_ = image_set_by_controller;
51 } 51 }
52 52
53 // Returns items for the application menu; used for convenience and testing. 53 // Returns items for the application menu; used for convenience and testing.
54 virtual MenuItemList GetAppMenuItems(int event_flags); 54 virtual MenuItemList GetAppMenuItems(int event_flags);
55 55
56 // Returns nullptr if class is not AppWindowLauncherItemController. 56 // Returns nullptr if class is not AppWindowLauncherItemController.
57 virtual AppWindowLauncherItemController* AsAppWindowLauncherItemController(); 57 virtual AppWindowLauncherItemController* AsAppWindowLauncherItemController();
58 58
59 // Returns true if controller represents a shortcut.
60 virtual bool IsShortcut() const;
61
59 private: 62 private:
60 // The application id; empty if there is no app associated with the item. 63 // The application id; empty if there is no app associated with the item.
61 const std::string app_id_; 64 const std::string app_id_;
62 65
63 // An id that can be passed to an app when launched in order to support 66 // An id that can be passed to an app when launched in order to support
64 // multiple shelf items per app. This id is used together with the app_id to 67 // multiple shelf items per app. This id is used together with the app_id to
65 // uniquely identify each shelf item that has the same app_id. 68 // uniquely identify each shelf item that has the same app_id.
66 const std::string launch_id_; 69 const std::string launch_id_;
67 70
68 // A unique id assigned by the shelf model for the shelf item. 71 // A unique id assigned by the shelf model for the shelf item.
69 ash::ShelfID shelf_id_; 72 ash::ShelfID shelf_id_;
70 73
71 ChromeLauncherController* launcher_controller_; 74 ChromeLauncherController* launcher_controller_;
72 75
73 // The lock counter which tells the launcher if the item can be removed from 76 // The lock counter which tells the launcher if the item can be removed from
74 // the launcher (0) or not (>0). It is being used for windowed V1 77 // the launcher (0) or not (>0). It is being used for windowed V1
75 // applications. 78 // applications.
76 int locked_; 79 int locked_;
77 80
78 // Set to true if the launcher item image has been set by the controller. 81 // Set to true if the launcher item image has been set by the controller.
79 bool image_set_by_controller_; 82 bool image_set_by_controller_;
80 83
81 DISALLOW_COPY_AND_ASSIGN(LauncherItemController); 84 DISALLOW_COPY_AND_ASSIGN(LauncherItemController);
82 }; 85 };
83 86
84 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_ITEM_CONTROLLER_H_ 87 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_ITEM_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698