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

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

Issue 2684723003: Remove LauncherItemController::Launch, cleanup. (Closed)
Patch Set: Cleanup Created 3 years, 10 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_delegate.h" 10 #include "ash/common/shelf/shelf_item_delegate.h"
(...skipping 29 matching lines...) Expand all
40 DCHECK(locked_); 40 DCHECK(locked_);
41 locked_--; 41 locked_--;
42 } 42 }
43 bool locked() const { return locked_ > 0; } 43 bool locked() const { return locked_ > 0; }
44 44
45 bool image_set_by_controller() const { return image_set_by_controller_; } 45 bool image_set_by_controller() const { return image_set_by_controller_; }
46 void set_image_set_by_controller(bool image_set_by_controller) { 46 void set_image_set_by_controller(bool image_set_by_controller) {
47 image_set_by_controller_ = image_set_by_controller; 47 image_set_by_controller_ = image_set_by_controller;
48 } 48 }
49 49
50 // Launches a new instance of the app associated with this item.
51 virtual void Launch(ash::LaunchSource source, int event_flags) = 0;
52
53 // Shows and activates the most-recently-active window associated with the 50 // Shows and activates the most-recently-active window associated with the
54 // item, or launches the item if it is not currently open. 51 // item, or launches the item if it is not currently open.
55 // Returns the action performed by activating the item. 52 // Returns the action performed by activating the item.
56 virtual PerformedAction Activate(ash::LaunchSource source) = 0; 53 virtual PerformedAction Activate(ash::LaunchSource source) = 0;
57 54
58 // Returns nullptr if class is not AppWindowLauncherItemController. 55 // Returns nullptr if class is not AppWindowLauncherItemController.
59 virtual AppWindowLauncherItemController* AsAppWindowLauncherItemController(); 56 virtual AppWindowLauncherItemController* AsAppWindowLauncherItemController();
60 57
61 private: 58 private:
62 // The application id; empty if there is no app associated with the item. 59 // The application id; empty if there is no app associated with the item.
(...skipping 14 matching lines...) Expand all
77 // applications. 74 // applications.
78 int locked_; 75 int locked_;
79 76
80 // Set to true if the launcher item image has been set by the controller. 77 // Set to true if the launcher item image has been set by the controller.
81 bool image_set_by_controller_; 78 bool image_set_by_controller_;
82 79
83 DISALLOW_COPY_AND_ASSIGN(LauncherItemController); 80 DISALLOW_COPY_AND_ASSIGN(LauncherItemController);
84 }; 81 };
85 82
86 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_ITEM_CONTROLLER_H_ 83 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_ITEM_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698