| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "ash/common/shelf/shelf_item_delegate.h" | 10 #include "ash/common/shelf/shelf_item_delegate.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 ChromeLauncherController* launcher_controller() const { | 52 ChromeLauncherController* launcher_controller() const { |
| 53 return launcher_controller_; | 53 return launcher_controller_; |
| 54 } | 54 } |
| 55 | 55 |
| 56 // Lock this item to the launcher without being pinned (windowed v1 apps). | 56 // Lock this item to the launcher without being pinned (windowed v1 apps). |
| 57 void lock() { locked_++; } | 57 void lock() { locked_++; } |
| 58 void unlock() { | 58 void unlock() { |
| 59 DCHECK(locked_); | 59 DCHECK(locked_); |
| 60 locked_--; | 60 locked_--; |
| 61 } | 61 } |
| 62 bool locked() { return locked_ > 0; } | 62 bool locked() const { return locked_ > 0; } |
| 63 | 63 |
| 64 bool image_set_by_controller() const { return image_set_by_controller_; } | 64 bool image_set_by_controller() const { return image_set_by_controller_; } |
| 65 void set_image_set_by_controller(bool image_set_by_controller) { | 65 void set_image_set_by_controller(bool image_set_by_controller) { |
| 66 image_set_by_controller_ = image_set_by_controller; | 66 image_set_by_controller_ = image_set_by_controller; |
| 67 } | 67 } |
| 68 | 68 |
| 69 // Returns true if this item is open. | 69 // Returns true if this item is open. |
| 70 virtual bool IsOpen() const = 0; | 70 virtual bool IsOpen() const = 0; |
| 71 | 71 |
| 72 // Returns true if this item is visible (e.g. not minimized). | 72 // Returns true if this item is visible (e.g. not minimized). |
| (...skipping 25 matching lines...) Expand all Loading... |
| 98 // applications. | 98 // applications. |
| 99 int locked_; | 99 int locked_; |
| 100 | 100 |
| 101 // Set to true if the launcher item image has been set by the controller. | 101 // Set to true if the launcher item image has been set by the controller. |
| 102 bool image_set_by_controller_; | 102 bool image_set_by_controller_; |
| 103 | 103 |
| 104 DISALLOW_COPY_AND_ASSIGN(LauncherItemController); | 104 DISALLOW_COPY_AND_ASSIGN(LauncherItemController); |
| 105 }; | 105 }; |
| 106 | 106 |
| 107 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_ITEM_CONTROLLER_H_ | 107 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_ITEM_CONTROLLER_H_ |
| OLD | NEW |