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

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
Index: chrome/renderer/extensions/dispatcher.cc
diff --git a/chrome/renderer/extensions/dispatcher.cc b/chrome/renderer/extensions/dispatcher.cc
index 94a90d6dd15e027f56171962a0c3e7041b9f7f32..a79f421387d141aebd4ae61a1e307d78f559e9e4 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);
@@ -780,7 +781,7 @@ void Dispatcher::DidCreateScriptContext(
int manifest_version = extension ? extension->manifest_version() : 1;
bool send_request_disabled =
(extension && extension->location() == Manifest::LOAD &&
- extension->has_lazy_background_page());
+ BackgroundInfo::HasLazyBackgroundPage(extension));
module_system->RegisterNativeHandler("process",
scoped_ptr<NativeHandler>(new ProcessInfoNativeHandler(
this, context->GetExtensionID(),

Powered by Google App Engine
This is Rietveld 408576698