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

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

Issue 11442044: Show app list items which open in chrome with a tab overlay. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 8 years 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/app/theme/theme_resources.grd ('k') | chrome/browser/ui/app_list/extension_app_item.cc » ('j') | 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_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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // |next|. Note that |prev| and |next| could be NULL when the app is put at 44 // |next|. Note that |prev| and |next| could be NULL when the app is put at
45 // the beginning or at the end. 45 // the beginning or at the end.
46 void Move(const ExtensionAppItem* prev, const ExtensionAppItem* next); 46 void Move(const ExtensionAppItem* prev, const ExtensionAppItem* next);
47 47
48 const std::string& extension_id() const { return extension_id_; } 48 const std::string& extension_id() const { return extension_id_; }
49 49
50 private: 50 private:
51 // Loads extension icon. 51 // Loads extension icon.
52 void LoadImage(const extensions::Extension* extension); 52 void LoadImage(const extensions::Extension* extension);
53 53
54 // Whether or not the app item has an overlay.
55 bool HasOverlay();
56
57 // Sets the app item's icon, if necessary adding an overlay.
58 void SetIconWithOverlay(const gfx::ImageSkia& icon);
59
54 void ShowExtensionOptions(); 60 void ShowExtensionOptions();
55 void ShowExtensionDetails(); 61 void ShowExtensionDetails();
56 void StartExtensionUninstall(); 62 void StartExtensionUninstall();
57 63
58 // Overridden from extensions::IconImage::Observer: 64 // Overridden from extensions::IconImage::Observer:
59 virtual void OnExtensionIconImageChanged( 65 virtual void OnExtensionIconImageChanged(
60 extensions::IconImage* image) OVERRIDE; 66 extensions::IconImage* image) OVERRIDE;
61 67
62 // Overridden from ui::SimpleMenuModel::Delegate: 68 // Overridden from ui::SimpleMenuModel::Delegate:
63 virtual bool IsItemForCommandIdDynamic(int command_id) const OVERRIDE; 69 virtual bool IsItemForCommandIdDynamic(int command_id) const OVERRIDE;
(...skipping 17 matching lines...) Expand all
81 AppListControllerDelegate* controller_; 87 AppListControllerDelegate* controller_;
82 88
83 scoped_ptr<extensions::IconImage> icon_; 89 scoped_ptr<extensions::IconImage> icon_;
84 scoped_ptr<ui::SimpleMenuModel> context_menu_model_; 90 scoped_ptr<ui::SimpleMenuModel> context_menu_model_;
85 scoped_ptr<extensions::ContextMenuMatcher> extension_menu_items_; 91 scoped_ptr<extensions::ContextMenuMatcher> extension_menu_items_;
86 92
87 DISALLOW_COPY_AND_ASSIGN(ExtensionAppItem); 93 DISALLOW_COPY_AND_ASSIGN(ExtensionAppItem);
88 }; 94 };
89 95
90 #endif // CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_ITEM_H_ 96 #endif // CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_ITEM_H_
OLDNEW
« no previous file with comments | « chrome/app/theme/theme_resources.grd ('k') | chrome/browser/ui/app_list/extension_app_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698