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

Side by Side Diff: chrome/browser/extensions/api/developer_private/developer_private_api.cc

Issue 1105683003: [Extensions Page] Add a listener on extension list for "hasExtensions" changing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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/browser/extensions/api/developer_private/developer_private_api. h" 5 #include "chrome/browser/extensions/api/developer_private/developer_private_api. h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 277
278 void DeveloperPrivateEventRouter::OnExtensionUnloaded( 278 void DeveloperPrivateEventRouter::OnExtensionUnloaded(
279 content::BrowserContext* browser_context, 279 content::BrowserContext* browser_context,
280 const Extension* extension, 280 const Extension* extension,
281 UnloadedExtensionInfo::Reason reason) { 281 UnloadedExtensionInfo::Reason reason) {
282 DCHECK(profile_->IsSameProfile(Profile::FromBrowserContext(browser_context))); 282 DCHECK(profile_->IsSameProfile(Profile::FromBrowserContext(browser_context)));
283 BroadcastItemStateChanged( 283 BroadcastItemStateChanged(
284 browser_context, developer::EVENT_TYPE_UNLOADED, extension->id()); 284 browser_context, developer::EVENT_TYPE_UNLOADED, extension->id());
285 } 285 }
286 286
287 void DeveloperPrivateEventRouter::OnExtensionWillBeInstalled( 287 void DeveloperPrivateEventRouter::OnExtensionInstalled(
288 content::BrowserContext* browser_context, 288 content::BrowserContext* browser_context,
289 const Extension* extension, 289 const Extension* extension,
290 bool is_update, 290 bool is_update) {
291 bool from_ephemeral,
292 const std::string& old_name) {
293 DCHECK(profile_->IsSameProfile(Profile::FromBrowserContext(browser_context))); 291 DCHECK(profile_->IsSameProfile(Profile::FromBrowserContext(browser_context)));
294 BroadcastItemStateChanged( 292 BroadcastItemStateChanged(
295 browser_context, developer::EVENT_TYPE_INSTALLED, extension->id()); 293 browser_context, developer::EVENT_TYPE_INSTALLED, extension->id());
296 } 294 }
297 295
298 void DeveloperPrivateEventRouter::OnExtensionUninstalled( 296 void DeveloperPrivateEventRouter::OnExtensionUninstalled(
299 content::BrowserContext* browser_context, 297 content::BrowserContext* browser_context,
300 const Extension* extension, 298 const Extension* extension,
301 extensions::UninstallReason reason) { 299 extensions::UninstallReason reason) {
302 DCHECK(profile_->IsSameProfile(Profile::FromBrowserContext(browser_context))); 300 DCHECK(profile_->IsSameProfile(Profile::FromBrowserContext(browser_context)));
(...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after
1373 // We explicitly show manifest.json in order to work around an issue in OSX 1371 // We explicitly show manifest.json in order to work around an issue in OSX
1374 // where opening the directory doesn't focus the Finder. 1372 // where opening the directory doesn't focus the Finder.
1375 platform_util::ShowItemInFolder(GetProfile(), 1373 platform_util::ShowItemInFolder(GetProfile(),
1376 extension->path().Append(kManifestFilename)); 1374 extension->path().Append(kManifestFilename));
1377 return RespondNow(NoArguments()); 1375 return RespondNow(NoArguments());
1378 } 1376 }
1379 1377
1380 } // namespace api 1378 } // namespace api
1381 1379
1382 } // namespace extensions 1380 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698