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

Unified Diff: chrome/renderer/extensions/dispatcher.cc

Issue 12253022: Manifest handler for all keys background-related. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | chrome/renderer/extensions/event_bindings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/dispatcher.cc
diff --git a/chrome/renderer/extensions/dispatcher.cc b/chrome/renderer/extensions/dispatcher.cc
index 930cb5d568e4bfc8812c9d484c4820e8c8efeaf5..ea7a76b1fd1730bcd94978c07c5867863411fffc 100644
--- a/chrome/renderer/extensions/dispatcher.cc
+++ b/chrome/renderer/extensions/dispatcher.cc
@@ -12,6 +12,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_version_info.h"
#include "chrome/common/extensions/api/extension_api.h"
+#include "chrome/common/extensions/background_info.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_messages.h"
#include "chrome/common/extensions/manifest.h"
@@ -168,7 +169,7 @@ class LazyBackgroundPageNativeHandler : public ChromeV8Extension {
return false;
ExtensionHelper* helper = ExtensionHelper::Get(render_view);
- return (extension && extension->has_lazy_background_page() &&
+ return (extension && BackgroundInfo::HasLazyBackgroundPage(extension) &&
helper->view_type() == chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE);
}
};
@@ -447,7 +448,7 @@ void Dispatcher::OnMessageInvoke(const std::string& extension_id,
// Tell the browser process when an event has been dispatched with a lazy
// background page active.
const Extension* extension = extensions_.GetByID(extension_id);
- if (extension && extension->has_lazy_background_page() &&
+ if (extension && BackgroundInfo::HasLazyBackgroundPage(extension) &&
function_name == kEventDispatchFunction) {
RenderView* background_view =
ExtensionHelper::GetBackgroundPage(extension_id);
@@ -784,7 +785,7 @@ void Dispatcher::DidCreateScriptContext(
int manifest_version = extension ? extension->manifest_version() : 1;
bool send_request_disabled =
(extension && Manifest::IsUnpackedLocation(extension->location()) &&
- extension->has_lazy_background_page());
+ BackgroundInfo::HasLazyBackgroundPage(extension));
module_system->RegisterNativeHandler("process",
scoped_ptr<NativeHandler>(new ProcessInfoNativeHandler(
this, context->GetExtensionID(),
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | chrome/renderer/extensions/event_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698