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

Side by Side Diff: chrome/browser/ui/app_list/extension_app_item.h

Issue 671653002: Standardize usage of virtual/override/final in chrome/browser/ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
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_APP_LIST_EXTENSION_APP_ITEM_H_ 5 #ifndef CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_ITEM_H_
6 #define CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_ITEM_H_ 6 #define CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_ITEM_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 24 matching lines...) Expand all
35 public app_list::AppContextMenuDelegate { 35 public app_list::AppContextMenuDelegate {
36 public: 36 public:
37 static const char kItemType[]; 37 static const char kItemType[];
38 38
39 ExtensionAppItem(Profile* profile, 39 ExtensionAppItem(Profile* profile,
40 const app_list::AppListSyncableService::SyncItem* sync_item, 40 const app_list::AppListSyncableService::SyncItem* sync_item,
41 const std::string& extension_id, 41 const std::string& extension_id,
42 const std::string& extension_name, 42 const std::string& extension_name,
43 const gfx::ImageSkia& installing_icon, 43 const gfx::ImageSkia& installing_icon,
44 bool is_platform_app); 44 bool is_platform_app);
45 virtual ~ExtensionAppItem(); 45 ~ExtensionAppItem() override;
46 46
47 // Reload the title and icon from the underlying extension. 47 // Reload the title and icon from the underlying extension.
48 void Reload(); 48 void Reload();
49 49
50 // Updates the app item's icon, if necessary adding an overlay and/or making 50 // Updates the app item's icon, if necessary adding an overlay and/or making
51 // it gray. 51 // it gray.
52 void UpdateIcon(); 52 void UpdateIcon();
53 53
54 // Update page and app launcher ordinals to put the app in between |prev| and 54 // Update page and app launcher ordinals to put the app in between |prev| and
55 // |next|. Note that |prev| and |next| could be NULL when the app is put at 55 // |next|. Note that |prev| and |next| could be NULL when the app is put at
(...skipping 16 matching lines...) Expand all
72 // running. 72 // running.
73 bool RunExtensionEnableFlow(); 73 bool RunExtensionEnableFlow();
74 74
75 // Private equivalent to Activate(), without refocus for already-running apps. 75 // Private equivalent to Activate(), without refocus for already-running apps.
76 void Launch(int event_flags); 76 void Launch(int event_flags);
77 77
78 // Whether or not the app item needs an overlay. 78 // Whether or not the app item needs an overlay.
79 bool NeedsOverlay() const; 79 bool NeedsOverlay() const;
80 80
81 // Overridden from extensions::IconImage::Observer: 81 // Overridden from extensions::IconImage::Observer:
82 virtual void OnExtensionIconImageChanged( 82 void OnExtensionIconImageChanged(extensions::IconImage* image) override;
83 extensions::IconImage* image) override;
84 83
85 // Overridden from ExtensionEnableFlowDelegate: 84 // Overridden from ExtensionEnableFlowDelegate:
86 virtual void ExtensionEnableFlowFinished() override; 85 void ExtensionEnableFlowFinished() override;
87 virtual void ExtensionEnableFlowAborted(bool user_initiated) override; 86 void ExtensionEnableFlowAborted(bool user_initiated) override;
88 87
89 // Overridden from AppListItem: 88 // Overridden from AppListItem:
90 virtual void Activate(int event_flags) override; 89 void Activate(int event_flags) override;
91 virtual ui::MenuModel* GetContextMenuModel() override; 90 ui::MenuModel* GetContextMenuModel() override;
92 // Updates the icon if the overlay needs to be added/removed. 91 // Updates the icon if the overlay needs to be added/removed.
93 virtual void OnExtensionPreferenceChanged() override; 92 void OnExtensionPreferenceChanged() override;
94 virtual const char* GetItemType() const override; 93 const char* GetItemType() const override;
95 94
96 // Overridden from app_list::AppContextMenuDelegate: 95 // Overridden from app_list::AppContextMenuDelegate:
97 virtual void ExecuteLaunchCommand(int event_flags) override; 96 void ExecuteLaunchCommand(int event_flags) override;
98 97
99 // Set the position from the extension ordering. 98 // Set the position from the extension ordering.
100 void UpdatePositionFromExtensionOrdering(); 99 void UpdatePositionFromExtensionOrdering();
101 100
102 // Return the controller for the active desktop type. 101 // Return the controller for the active desktop type.
103 AppListControllerDelegate* GetController(); 102 AppListControllerDelegate* GetController();
104 103
105 Profile* profile_; 104 Profile* profile_;
106 const std::string extension_id_; 105 const std::string extension_id_;
107 106
(...skipping 11 matching lines...) Expand all
119 // Whether or not this app is a platform app. 118 // Whether or not this app is a platform app.
120 bool is_platform_app_; 119 bool is_platform_app_;
121 120
122 // Whether this app item has an overlay. 121 // Whether this app item has an overlay.
123 bool has_overlay_; 122 bool has_overlay_;
124 123
125 DISALLOW_COPY_AND_ASSIGN(ExtensionAppItem); 124 DISALLOW_COPY_AND_ASSIGN(ExtensionAppItem);
126 }; 125 };
127 126
128 #endif // CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_ITEM_H_ 127 #endif // CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_ITEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698