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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 1828733004: Load application manifests from resources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 8fd472b5a50d86dd28f19e658a9be720aa1bae67..85d0cff6f44ac4e54207fe5d5e0b63bf39d0a335 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -102,6 +102,7 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/url_constants.h"
+#include "chrome/grit/browser_resources.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/installer/util/google_update_settings.h"
#include "chromeos/chromeos_constants.h"
@@ -2777,6 +2778,38 @@ bool ChromeContentBrowserClient::ShouldUseWindowsPrefetchArgument() const {
}
#endif // defined(OS_WIN)
+std::string ChromeContentBrowserClient::GetPackagedMojoApplicationName() {
+ return "exe:chrome";
+}
+
+std::string ChromeContentBrowserClient::GetMojoApplicationNameForProcess(
+ content::ProcessType type) {
+ switch (type) {
+ case content::PROCESS_TYPE_RENDERER:
+ return "exe:chrome_renderer";
+
+ default:
+ return std::string();
+ }
+}
+
+bool ChromeContentBrowserClient::GetMojoApplicationManifest(
+ const base::StringPiece& name,
+ std::string* manifest_contents) {
+ ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
+ if (name == "exe:chrome") {
+ *manifest_contents =
+ rb.GetRawDataResource(IDR_MOJO_CHROME_MANIFEST).as_string();
+ return true;
+ } else if (name == "exe:chrome_renderer") {
+ *manifest_contents =
+ rb.GetRawDataResource(IDR_MOJO_CHROME_RENDERER_MANIFEST).as_string();
+ return true;
+ }
+
+ return false;
+}
+
void ChromeContentBrowserClient::RegisterFrameMojoShellServices(
content::ServiceRegistry* registry,
content::RenderFrameHost* render_frame_host) {

Powered by Google App Engine
This is Rietveld 408576698