diff options
author | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-12 17:57:09 +0000 |
---|---|---|
committer | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-12 17:57:09 +0000 |
commit | b2a74caaf15e234b5e6c03151d12c28a319a06cb (patch) | |
tree | 4b0f606a6ee117a66e66e4b7fb6546d9943bd425 /chrome/renderer/render_thread.cc | |
parent | 293caa54c215807abcef6a31aa34ca0e49e51581 (diff) | |
download | chromium_src-b2a74caaf15e234b5e6c03151d12c28a319a06cb.zip chromium_src-b2a74caaf15e234b5e6c03151d12c28a319a06cb.tar.gz chromium_src-b2a74caaf15e234b5e6c03151d12c28a319a06cb.tar.bz2 |
Add chrome.extension.inIncognitoTab for content scripts.
Review URL: http://codereview.chromium.org/822008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41446 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_thread.cc')
-rw-r--r-- | chrome/renderer/render_thread.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/chrome/renderer/render_thread.cc b/chrome/renderer/render_thread.cc index 7ad062e..3d63405 100644 --- a/chrome/renderer/render_thread.cc +++ b/chrome/renderer/render_thread.cc @@ -210,6 +210,7 @@ void RenderThread::Init() { std::string type_str = CommandLine::ForCurrentProcess()->GetSwitchValueASCII( switches::kProcessType); is_extension_process_ = type_str == switches::kExtensionProcess; + is_incognito_process_ = false; suspend_webkit_shared_timer_ = true; notify_webkit_of_modal_loop_ = true; did_notify_webkit_of_modal_loop_ = false; @@ -455,10 +456,9 @@ void RenderThread::OnSetZoomLevelForCurrentHost(const std::string& host, RenderView::ForEach(&zoomer); } -void RenderThread::OnUpdateUserScripts( - base::SharedMemoryHandle scripts, bool only_inject_incognito) { +void RenderThread::OnUpdateUserScripts(base::SharedMemoryHandle scripts) { DCHECK(base::SharedMemory::IsHandleValid(scripts)) << "Bad scripts handle"; - user_script_slave_->UpdateScripts(scripts, only_inject_incognito); + user_script_slave_->UpdateScripts(scripts); UpdateActiveExtensions(); } @@ -517,6 +517,7 @@ void RenderThread::OnControlMessageReceived(const IPC::Message& msg) { OnSetContentSettingsForCurrentHost) IPC_MESSAGE_HANDLER(ViewMsg_SetZoomLevelForCurrentHost, OnSetZoomLevelForCurrentHost) + IPC_MESSAGE_HANDLER(ViewMsg_SetIsIncognitoProcess, OnSetIsIncognitoProcess) IPC_MESSAGE_HANDLER(ViewMsg_SetNextPageID, OnSetNextPageID) IPC_MESSAGE_HANDLER(ViewMsg_SetCSSColors, OnSetCSSColors) // TODO(port): removed from render_messages_internal.h; @@ -923,3 +924,7 @@ void RenderThread::OnSpellCheckWordAdded(const std::string& word) { void RenderThread::OnSpellCheckEnableAutoSpellCorrect(bool enable) { spellchecker_->EnableAutoSpellCorrect(enable); } + +void RenderThread::OnSetIsIncognitoProcess(bool is_incognito_process) { + is_incognito_process_ = is_incognito_process; +} |