OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/chromeos/note_taking_helper.h" | 5 #include "chrome/browser/chromeos/note_taking_helper.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "apps/launcher.h" | 10 #include "apps/launcher.h" |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 extensions::ActionHandlersInfo::HasActionHandler( | 414 extensions::ActionHandlersInfo::HasActionHandler( |
415 extension, app_runtime::ACTION_TYPE_NEW_NOTE)) { | 415 extension, app_runtime::ACTION_TYPE_NEW_NOTE)) { |
416 for (auto& observer : observers_) | 416 for (auto& observer : observers_) |
417 observer.OnAvailableNoteTakingAppsUpdated(); | 417 observer.OnAvailableNoteTakingAppsUpdated(); |
418 } | 418 } |
419 } | 419 } |
420 | 420 |
421 void NoteTakingHelper::OnExtensionUnloaded( | 421 void NoteTakingHelper::OnExtensionUnloaded( |
422 content::BrowserContext* browser_context, | 422 content::BrowserContext* browser_context, |
423 const extensions::Extension* extension, | 423 const extensions::Extension* extension, |
424 extensions::UnloadedExtensionInfo::Reason reason) { | 424 extensions::UnloadedExtensionReason reason) { |
425 if (IsWhitelistedChromeApp(extension) || | 425 if (IsWhitelistedChromeApp(extension) || |
426 extensions::ActionHandlersInfo::HasActionHandler( | 426 extensions::ActionHandlersInfo::HasActionHandler( |
427 extension, app_runtime::ACTION_TYPE_NEW_NOTE)) { | 427 extension, app_runtime::ACTION_TYPE_NEW_NOTE)) { |
428 for (auto& observer : observers_) | 428 for (auto& observer : observers_) |
429 observer.OnAvailableNoteTakingAppsUpdated(); | 429 observer.OnAvailableNoteTakingAppsUpdated(); |
430 } | 430 } |
431 } | 431 } |
432 | 432 |
433 void NoteTakingHelper::OnShutdown(extensions::ExtensionRegistry* registry) { | 433 void NoteTakingHelper::OnShutdown(extensions::ExtensionRegistry* registry) { |
434 extension_registry_observer_.Remove(registry); | 434 extension_registry_observer_.Remove(registry); |
435 } | 435 } |
436 | 436 |
437 } // namespace chromeos | 437 } // namespace chromeos |
OLD | NEW |