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

Side by Side Diff: chrome/browser/extensions/extension_system_impl.cc

Issue 1152613003: Implement sidebar support for extension action popups (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move SidebarManager to ExtensionSystem and remove notifications Created 5 years, 6 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 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 "chrome/browser/extensions/extension_system_impl.h" 5 #include "chrome/browser/extensions/extension_system_impl.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "base/metrics/field_trial.h" 12 #include "base/metrics/field_trial.h"
13 #include "base/metrics/histogram.h" 13 #include "base/metrics/histogram.h"
14 #include "base/strings/string_tokenizer.h" 14 #include "base/strings/string_tokenizer.h"
15 #include "base/strings/string_util.h" 15 #include "base/strings/string_util.h"
16 #include "base/trace_event/trace_event.h" 16 #include "base/trace_event/trace_event.h"
17 #include "chrome/browser/browser_process.h" 17 #include "chrome/browser/browser_process.h"
18 #include "chrome/browser/content_settings/cookie_settings.h" 18 #include "chrome/browser/content_settings/cookie_settings.h"
19 #include "chrome/browser/extensions/component_loader.h" 19 #include "chrome/browser/extensions/component_loader.h"
20 #include "chrome/browser/extensions/extension_error_reporter.h" 20 #include "chrome/browser/extensions/extension_error_reporter.h"
21 #include "chrome/browser/extensions/extension_management.h" 21 #include "chrome/browser/extensions/extension_management.h"
22 #include "chrome/browser/extensions/extension_service.h" 22 #include "chrome/browser/extensions/extension_service.h"
23 #include "chrome/browser/extensions/extension_system_factory.h" 23 #include "chrome/browser/extensions/extension_system_factory.h"
24 #include "chrome/browser/extensions/extension_util.h" 24 #include "chrome/browser/extensions/extension_util.h"
25 #include "chrome/browser/extensions/install_verifier.h" 25 #include "chrome/browser/extensions/install_verifier.h"
26 #include "chrome/browser/extensions/navigation_observer.h" 26 #include "chrome/browser/extensions/navigation_observer.h"
27 #include "chrome/browser/extensions/shared_module_service.h" 27 #include "chrome/browser/extensions/shared_module_service.h"
28 #include "chrome/browser/extensions/shared_user_script_master.h" 28 #include "chrome/browser/extensions/shared_user_script_master.h"
29 #include "chrome/browser/extensions/sidebar_manager.h"
29 #include "chrome/browser/extensions/state_store_notification_observer.h" 30 #include "chrome/browser/extensions/state_store_notification_observer.h"
30 #include "chrome/browser/extensions/unpacked_installer.h" 31 #include "chrome/browser/extensions/unpacked_installer.h"
31 #include "chrome/browser/profiles/profile.h" 32 #include "chrome/browser/profiles/profile.h"
32 #include "chrome/browser/profiles/profile_manager.h" 33 #include "chrome/browser/profiles/profile_manager.h"
33 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" 34 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h"
34 #include "chrome/common/chrome_switches.h" 35 #include "chrome/common/chrome_switches.h"
35 #include "chrome/common/chrome_version_info.h" 36 #include "chrome/common/chrome_version_info.h"
36 #include "chrome/common/extensions/extension_constants.h" 37 #include "chrome/common/extensions/extension_constants.h"
37 #include "chrome/common/extensions/features/feature_channel.h" 38 #include "chrome/common/extensions/features/feature_channel.h"
38 #include "content/public/browser/browser_thread.h" 39 #include "content/public/browser/browser_thread.h"
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 551
551 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( 552 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts(
552 const std::string& extension_id, 553 const std::string& extension_id,
553 const UnloadedExtensionInfo::Reason reason) { 554 const UnloadedExtensionInfo::Reason reason) {
554 BrowserThread::PostTask( 555 BrowserThread::PostTask(
555 BrowserThread::IO, 556 BrowserThread::IO,
556 FROM_HERE, 557 FROM_HERE,
557 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason)); 558 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason));
558 } 559 }
559 560
561 SidebarManager* ExtensionSystemImpl::sidebar_manager() {
562 if (!sidebar_manager_)
563 CreateSidebarManager();
564 return sidebar_manager_.get();
565 }
566
567 void ExtensionSystemImpl::CreateSidebarManager() {
568 DCHECK(sidebar_manager_.get() == NULL);
569 sidebar_manager_ = new SidebarManager();
570 }
571
560 } // namespace extensions 572 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698