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

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

Issue 2364983002: Fix possible overlapping icons in shelf on sync. (Closed)
Patch Set: nits Created 4 years, 2 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/chrome_launcher_controller_impl.cc ('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 #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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 ChromeLauncherController* launcher_controller() const { 54 ChromeLauncherController* launcher_controller() const {
55 return launcher_controller_; 55 return launcher_controller_;
56 } 56 }
57 57
58 // Lock this item to the launcher without being pinned (windowed v1 apps). 58 // Lock this item to the launcher without being pinned (windowed v1 apps).
59 void lock() { locked_++; } 59 void lock() { locked_++; }
60 void unlock() { 60 void unlock() {
61 DCHECK(locked_); 61 DCHECK(locked_);
62 locked_--; 62 locked_--;
63 } 63 }
64 bool locked() { return locked_ > 0; } 64 bool locked() const { return locked_ > 0; }
65 65
66 bool image_set_by_controller() const { return image_set_by_controller_; } 66 bool image_set_by_controller() const { return image_set_by_controller_; }
67 void set_image_set_by_controller(bool image_set_by_controller) { 67 void set_image_set_by_controller(bool image_set_by_controller) {
68 image_set_by_controller_ = image_set_by_controller; 68 image_set_by_controller_ = image_set_by_controller;
69 } 69 }
70 70
71 // Returns true if this item is open. 71 // Returns true if this item is open.
72 virtual bool IsOpen() const = 0; 72 virtual bool IsOpen() const = 0;
73 73
74 // Returns true if this item is visible (e.g. not minimized). 74 // Returns true if this item is visible (e.g. not minimized).
(...skipping 30 matching lines...) Expand all
105 // applications. 105 // applications.
106 int locked_; 106 int locked_;
107 107
108 // Set to true if the launcher item image has been set by the controller. 108 // Set to true if the launcher item image has been set by the controller.
109 bool image_set_by_controller_; 109 bool image_set_by_controller_;
110 110
111 DISALLOW_COPY_AND_ASSIGN(LauncherItemController); 111 DISALLOW_COPY_AND_ASSIGN(LauncherItemController);
112 }; 112 };
113 113
114 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_ITEM_CONTROLLER_H_ 114 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_ITEM_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698