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

Side by Side Diff: extensions/browser/api/runtime/runtime_api.cc

Issue 298883006: Rename NOTIFICATION_EXTENSION_INSTALLED to (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment Created 6 years, 7 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/themes/theme_service.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/api/runtime/runtime_api.h" 5 #include "extensions/browser/api/runtime/runtime_api.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 137
138 RuntimeAPI::RuntimeAPI(content::BrowserContext* context) 138 RuntimeAPI::RuntimeAPI(content::BrowserContext* context)
139 : browser_context_(context), dispatch_chrome_updated_event_(false) { 139 : browser_context_(context), dispatch_chrome_updated_event_(false) {
140 registrar_.Add(this, 140 registrar_.Add(this,
141 chrome::NOTIFICATION_EXTENSIONS_READY, 141 chrome::NOTIFICATION_EXTENSIONS_READY,
142 content::Source<BrowserContext>(context)); 142 content::Source<BrowserContext>(context));
143 registrar_.Add(this, 143 registrar_.Add(this,
144 chrome::NOTIFICATION_EXTENSION_LOADED_DEPRECATED, 144 chrome::NOTIFICATION_EXTENSION_LOADED_DEPRECATED,
145 content::Source<BrowserContext>(context)); 145 content::Source<BrowserContext>(context));
146 registrar_.Add(this, 146 registrar_.Add(this,
147 chrome::NOTIFICATION_EXTENSION_INSTALLED, 147 chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
148 content::Source<BrowserContext>(context)); 148 content::Source<BrowserContext>(context));
149 registrar_.Add(this, 149 registrar_.Add(this,
150 chrome::NOTIFICATION_EXTENSION_UNINSTALLED, 150 chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
151 content::Source<BrowserContext>(context)); 151 content::Source<BrowserContext>(context));
152 152
153 delegate_ = ExtensionsBrowserClient::Get()->CreateRuntimeAPIDelegate( 153 delegate_ = ExtensionsBrowserClient::Get()->CreateRuntimeAPIDelegate(
154 browser_context_); 154 browser_context_);
155 155
156 // Check if registered events are up-to-date. We can only do this once 156 // Check if registered events are up-to-date. We can only do this once
157 // per browser context, since it updates internal state when called. 157 // per browser context, since it updates internal state when called.
(...skipping 12 matching lines...) Expand all
170 case chrome::NOTIFICATION_EXTENSIONS_READY: { 170 case chrome::NOTIFICATION_EXTENSIONS_READY: {
171 OnExtensionsReady(); 171 OnExtensionsReady();
172 break; 172 break;
173 } 173 }
174 case chrome::NOTIFICATION_EXTENSION_LOADED_DEPRECATED: { 174 case chrome::NOTIFICATION_EXTENSION_LOADED_DEPRECATED: {
175 const Extension* extension = 175 const Extension* extension =
176 content::Details<const Extension>(details).ptr(); 176 content::Details<const Extension>(details).ptr();
177 OnExtensionLoaded(extension); 177 OnExtensionLoaded(extension);
178 break; 178 break;
179 } 179 }
180 case chrome::NOTIFICATION_EXTENSION_INSTALLED: { 180 case chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED: {
181 const Extension* extension = 181 const Extension* extension =
182 content::Details<const InstalledExtensionInfo>(details)->extension; 182 content::Details<const InstalledExtensionInfo>(details)->extension;
183 OnExtensionInstalled(extension); 183 OnExtensionInstalled(extension);
184 break; 184 break;
185 } 185 }
186 case chrome::NOTIFICATION_EXTENSION_UNINSTALLED: { 186 case chrome::NOTIFICATION_EXTENSION_UNINSTALLED: {
187 const Extension* extension = 187 const Extension* extension =
188 content::Details<const Extension>(details).ptr(); 188 content::Details<const Extension>(details).ptr();
189 OnExtensionUninstalled(extension); 189 OnExtensionUninstalled(extension);
190 break; 190 break;
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 content::ChildProcessSecurityPolicy* policy = 507 content::ChildProcessSecurityPolicy* policy =
508 content::ChildProcessSecurityPolicy::GetInstance(); 508 content::ChildProcessSecurityPolicy::GetInstance();
509 policy->GrantReadFileSystem(renderer_id, filesystem_id); 509 policy->GrantReadFileSystem(renderer_id, filesystem_id);
510 base::DictionaryValue* dict = new base::DictionaryValue(); 510 base::DictionaryValue* dict = new base::DictionaryValue();
511 dict->SetString("fileSystemId", filesystem_id); 511 dict->SetString("fileSystemId", filesystem_id);
512 dict->SetString("baseName", relative_path); 512 dict->SetString("baseName", relative_path);
513 return RespondNow(OneArgument(dict)); 513 return RespondNow(OneArgument(dict));
514 } 514 }
515 515
516 } // namespace extensions 516 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/themes/theme_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698