Chromium Code Reviews| 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..7154b7c97124c9bb86121c9decbd16ca66508cfc 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/mojo/blob_channel_service.h" |
| +#include "blimp/grit/blimp_browser_resources.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,20 @@ 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) |
|
nyquist
2016/09/27 20:48:48
Nit: I think most of the rest of the engine code (
Menglin
2016/09/27 22:06:40
Done.
|
| + 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 |