OLD | NEW |
---|---|
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 "ash/launcher/launcher_types.h" | 8 #include "ash/launcher/launcher_types.h" |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 27 matching lines...) Expand all Loading... | |
38 | 38 |
39 LauncherItemController(Type type, | 39 LauncherItemController(Type type, |
40 const std::string& app_id, | 40 const std::string& app_id, |
41 ChromeLauncherController* launcher_controller); | 41 ChromeLauncherController* launcher_controller); |
42 virtual ~LauncherItemController(); | 42 virtual ~LauncherItemController(); |
43 | 43 |
44 Type type() const { return type_; } | 44 Type type() const { return type_; } |
45 ash::LauncherID launcher_id() const { return launcher_id_; } | 45 ash::LauncherID launcher_id() const { return launcher_id_; } |
46 void set_launcher_id(ash::LauncherID id) { launcher_id_ = id; } | 46 void set_launcher_id(ash::LauncherID id) { launcher_id_ = id; } |
47 virtual const std::string& app_id() const; | 47 virtual const std::string& app_id() const; |
48 ChromeLauncherController* launcher_controller() { | 48 ChromeLauncherController* launcher_controller() const { |
James Cook
2013/08/19 22:32:38
we don't usually use "const" for accessor function
simonhong_
2013/08/20 01:11:20
How about adding a const version of launcher_contr
| |
49 return launcher_controller_; | 49 return launcher_controller_; |
50 } | 50 } |
51 | 51 |
52 // Lock this item to the launcher without being pinned (windowed v1 apps). | 52 // Lock this item to the launcher without being pinned (windowed v1 apps). |
53 void lock() { locked_++; } | 53 void lock() { locked_++; } |
54 void unlock() { | 54 void unlock() { |
55 DCHECK(locked_); | 55 DCHECK(locked_); |
56 locked_--; | 56 locked_--; |
57 } | 57 } |
58 bool locked() { return locked_ > 0; } | 58 bool locked() { return locked_ > 0; } |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
124 // applications. | 124 // applications. |
125 int locked_; | 125 int locked_; |
126 | 126 |
127 // Set to true if the launcher item image has been set by the controller. | 127 // Set to true if the launcher item image has been set by the controller. |
128 bool image_set_by_controller_; | 128 bool image_set_by_controller_; |
129 | 129 |
130 DISALLOW_COPY_AND_ASSIGN(LauncherItemController); | 130 DISALLOW_COPY_AND_ASSIGN(LauncherItemController); |
131 }; | 131 }; |
132 | 132 |
133 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_ITEM_CONTROLLER_H_ | 133 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_ITEM_CONTROLLER_H_ |
OLD | NEW |