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

Side by Side Diff: chrome/common/extensions/api/extension_action/action_info.cc

Issue 1778603003: [Extensions] Update installed bubble for extensions with synthesized actions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Win fix Created 4 years, 9 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 #include "chrome/common/extensions/api/extension_action/action_info.h" 5 #include "chrome/common/extensions/api/extension_action/action_info.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/common/extensions/api/commands/commands_handler.h" 9 #include "chrome/common/extensions/api/commands/commands_handler.h"
10 #include "extensions/common/constants.h" 10 #include "extensions/common/constants.h"
(...skipping 27 matching lines...) Expand all
38 38
39 static const ActionInfo* GetActionInfo(const Extension* extension, 39 static const ActionInfo* GetActionInfo(const Extension* extension,
40 const std::string& key) { 40 const std::string& key) {
41 ActionInfoData* data = static_cast<ActionInfoData*>( 41 ActionInfoData* data = static_cast<ActionInfoData*>(
42 extension->GetManifestData(key)); 42 extension->GetManifestData(key));
43 return data ? data->action_info.get() : NULL; 43 return data ? data->action_info.get() : NULL;
44 } 44 }
45 45
46 } // namespace 46 } // namespace
47 47
48 ActionInfo::ActionInfo() { 48 ActionInfo::ActionInfo() : synthesized(false) {}
49 }
50 49
51 ActionInfo::ActionInfo(const ActionInfo& other) = default; 50 ActionInfo::ActionInfo(const ActionInfo& other) = default;
52 51
53 ActionInfo::~ActionInfo() { 52 ActionInfo::~ActionInfo() {
54 } 53 }
55 54
56 // static 55 // static
57 scoped_ptr<ActionInfo> ActionInfo::Load(const Extension* extension, 56 scoped_ptr<ActionInfo> ActionInfo::Load(const Extension* extension,
58 const base::DictionaryValue* dict, 57 const base::DictionaryValue* dict,
59 base::string16* error) { 58 base::string16* error) {
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 213
215 // static 214 // static
216 bool ActionInfo::IsVerboseInstallMessage(const Extension* extension) { 215 bool ActionInfo::IsVerboseInstallMessage(const Extension* extension) {
217 const ActionInfo* page_action_info = GetPageActionInfo(extension); 216 const ActionInfo* page_action_info = GetPageActionInfo(extension);
218 return page_action_info && 217 return page_action_info &&
219 (CommandsInfo::GetPageActionCommand(extension) || 218 (CommandsInfo::GetPageActionCommand(extension) ||
220 !page_action_info->default_icon.empty()); 219 !page_action_info->default_icon.empty());
221 } 220 }
222 221
223 } // namespace extensions 222 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698