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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2259903002: Enforce capability spec renderer <--> browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 3 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 2ca03dab7f182f9bb31fcae7b39ae8447ddd8e5c..7aac7cdfd613ea3c3fe9c18d278b096a75fa74aa 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -14,6 +14,7 @@
#include "base/bind_helpers.h"
#include "base/command_line.h"
#include "base/files/scoped_file.h"
+#include "base/json/json_reader.h"
#include "base/lazy_instance.h"
#include "base/macros.h"
#include "base/memory/ptr_util.h"
@@ -106,6 +107,7 @@
#include "chrome/common/render_messages.h"
#include "chrome/common/secure_origin_whitelist.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"
@@ -162,6 +164,7 @@
#include "content/public/common/content_switches.h"
#include "content/public/common/mojo_shell_connection.h"
#include "content/public/common/sandbox_type.h"
+#include "content/public/common/service_names.h"
#include "content/public/common/url_utils.h"
#include "content/public/common/web_preferences.h"
#include "device/usb/public/interfaces/chooser_service.mojom.h"
@@ -2973,6 +2976,21 @@ void ChromeContentBrowserClient::RegisterOutOfProcessMojoApplications(
#endif
}
+std::unique_ptr<base::Value>
+ChromeContentBrowserClient::GetServiceManifestOverlay(
+ const std::string& name) {
+ ResourceBundle& rb = ResourceBundle::GetSharedInstance();
+ int id = -1;
+ if (name == content::kBrowserMojoApplicationName)
+ id = IDR_CONTENT_BROWSER_MANIFEST_OVERLAY;
+ if (id == -1)
+ return nullptr;
+
+ base::StringPiece manifest_contents =
+ rb.GetRawDataResourceForScale(id, ui::ScaleFactor::SCALE_FACTOR_NONE);
+ return base::JSONReader::Read(manifest_contents);
+}
+
void ChromeContentBrowserClient::OpenURL(
content::BrowserContext* browser_context,
const content::OpenURLParams& params,
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/browser/content_browser_manifest_overlay.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698