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

Unified Diff: blimp/engine/app/blimp_content_browser_client.cc

Issue 2371233002: Blob Channel failed to register service (Closed)
Patch Set: update the generated blimp_browser_resources.h path in blimp/engine/app/blimp_content_browser_clien… 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: blimp/engine/app/blimp_content_browser_client.cc
diff --git a/blimp/engine/app/blimp_content_browser_client.cc b/blimp/engine/app/blimp_content_browser_client.cc
index b46470fd00db44d052ef8683f98d9ab35401a912..1d344eae5814a6e17ab1f54f87f1b50f1b8f0c40 100644
--- a/blimp/engine/app/blimp_content_browser_client.cc
+++ b/blimp/engine/app/blimp_content_browser_client.cc
@@ -2,12 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/json/json_reader.h"
#include "blimp/engine/app/blimp_browser_main_parts.h"
#include "blimp/engine/app/blimp_content_browser_client.h"
#include "blimp/engine/app/settings_manager.h"
+#include "blimp/engine/grit/blimp_browser_resources.h"
#include "blimp/engine/mojo/blob_channel_service.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/common/service_names.h"
#include "services/shell/public/cpp/interface_registry.h"
+#include "ui/base/resource/resource_bundle.h"
namespace blimp {
namespace engine {
@@ -48,5 +52,22 @@ void BlimpContentBrowserClient::ExposeInterfacesToRenderer(
base::Unretained(blimp_browser_main_parts_->GetBlobChannelService())));
}
+std::unique_ptr<base::Value>
+BlimpContentBrowserClient::GetServiceManifestOverlay(
+ const std::string& name) {
+ ResourceBundle& rb = ResourceBundle::GetSharedInstance();
+ int id = -1;
+ if (name == content::kBrowserMojoApplicationName) {
+ id = IDR_BLIMP_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);
+}
+
} // namespace engine
} // namespace blimp
« no previous file with comments | « blimp/engine/app/blimp_content_browser_client.h ('k') | blimp/engine/app/blimp_content_browser_manifest_overlay.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698