diff options
author | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-24 22:11:07 +0000 |
---|---|---|
committer | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-24 22:11:07 +0000 |
commit | 89ebc7edb982ebf5f8b185aa6e3aae6904eed965 (patch) | |
tree | ba32c69980b01c7c7d8d3f9d3cabebcb9ed88711 /chrome/browser/profile.cc | |
parent | 5101c0073bf723b6e6bc81273264eaf7ac124937 (diff) | |
download | chromium_src-89ebc7edb982ebf5f8b185aa6e3aae6904eed965.zip chromium_src-89ebc7edb982ebf5f8b185aa6e3aae6904eed965.tar.gz chromium_src-89ebc7edb982ebf5f8b185aa6e3aae6904eed965.tar.bz2 |
Exposes a chrome.devtools object to extensions. This allows extensions to call chrome.devtools.connect() to open up a Port by which it can receive devtools messages to implement the proposed perf trace extensions API documented here:
http://code.google.com/p/chromium/wiki/ExtensionsPerfTraceAPI
Review URL: http://codereview.chromium.org/159882
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24158 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profile.cc')
-rw-r--r-- | chrome/browser/profile.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc index 0e473315..77d4ff1 100644 --- a/chrome/browser/profile.cc +++ b/chrome/browser/profile.cc @@ -14,6 +14,7 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/browser_theme_provider.h" #include "chrome/browser/download/download_manager.h" +#include "chrome/browser/extensions/extension_devtools_manager.h" #include "chrome/browser/extensions/extension_message_service.h" #include "chrome/browser/extensions/extension_process_manager.h" #include "chrome/browser/extensions/extensions_service.h" @@ -220,6 +221,10 @@ class OffTheRecordProfileImpl : public Profile, return profile_->GetUserScriptMaster(); } + virtual ExtensionDevToolsManager* GetExtensionDevToolsManager() { + return NULL; + } + virtual ExtensionProcessManager* GetExtensionProcessManager() { return NULL; } @@ -494,6 +499,7 @@ class OffTheRecordProfileImpl : public Profile, ProfileImpl::ProfileImpl(const FilePath& path) : path_(path), visited_link_event_listener_(new VisitedLinkEventListener()), + extension_devtools_manager_(NULL), request_context_(NULL), media_request_context_(NULL), extensions_request_context_(NULL), @@ -512,6 +518,11 @@ ProfileImpl::ProfileImpl(const FilePath& path) TimeDelta::FromMilliseconds(kCreateSessionServiceDelayMS), this, &ProfileImpl::EnsureSessionServiceCreated); + if (CommandLine::ForCurrentProcess()->HasSwitch( + switches::kEnableExtensionTimelineApi)) { + extension_devtools_manager_ = new ExtensionDevToolsManager(this); + } + extension_process_manager_.reset(new ExtensionProcessManager(this)); extension_message_service_ = new ExtensionMessageService(this); @@ -744,6 +755,10 @@ UserScriptMaster* ProfileImpl::GetUserScriptMaster() { return user_script_master_.get(); } +ExtensionDevToolsManager* ProfileImpl::GetExtensionDevToolsManager() { + return extension_devtools_manager_.get(); +} + ExtensionProcessManager* ProfileImpl::GetExtensionProcessManager() { return extension_process_manager_.get(); } |