diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-07 21:20:11 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-07 21:20:11 +0000 |
commit | f120e9853776811f29342afca16766e21cf6c5c9 (patch) | |
tree | a04739217307d3e0bfa424120237bf7f510659a6 /chrome/browser/ui/webui/mojo_web_ui_controller.cc | |
parent | 260c993d2c75407033ba79687d5c4a710289a19b (diff) | |
download | chromium_src-f120e9853776811f29342afca16766e21cf6c5c9.zip chromium_src-f120e9853776811f29342afca16766e21cf6c5c9.tar.gz chromium_src-f120e9853776811f29342afca16766e21cf6c5c9.tar.bz2 |
Revert 262176 "Makes chrome://omnibox use mojo"
> Makes chrome://omnibox use mojo
>
> For the time being I'm moving chrome://omnibox behind USE_MOJO. Dave
> has a patch out to enable USE_MOJO for Mac, which means it's only
> android that won't have it for the time being.
>
> BUG=none
> TEST=none
> R=darin@chromium.org
>
> Review URL: https://codereview.chromium.org/222543004
TBR=sky@chromium.org
Review URL: https://codereview.chromium.org/227663003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262199 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/webui/mojo_web_ui_controller.cc')
-rw-r--r-- | chrome/browser/ui/webui/mojo_web_ui_controller.cc | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/chrome/browser/ui/webui/mojo_web_ui_controller.cc b/chrome/browser/ui/webui/mojo_web_ui_controller.cc deleted file mode 100644 index 099efaf..0000000 --- a/chrome/browser/ui/webui/mojo_web_ui_controller.cc +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/browser/ui/webui/mojo_web_ui_controller.h" - -#include "chrome/browser/profiles/profile.h" -#include "chrome/browser/ui/webui/mojo_web_ui_handler.h" -#include "content/public/browser/render_view_host.h" -#include "content/public/browser/web_ui_data_source.h" -#include "content/public/common/bindings_policy.h" -#include "mojo/public/cpp/bindings/interface.h" - -MojoWebUIController::MojoWebUIController(content::WebUI* contents) - : WebUIController(contents), - mojo_data_source_(NULL) { -} - -MojoWebUIController::~MojoWebUIController() { -} - -void MojoWebUIController::RenderViewCreated( - content::RenderViewHost* render_view_host) { - render_view_host->AllowBindings(content::BINDINGS_POLICY_WEB_UI); - - mojo::InterfacePipe<mojo::AnyInterface, mojo::AnyInterface> pipe; - ui_handler_ = CreateUIHandler(pipe.handle_to_peer.Pass()); - render_view_host->SetWebUIHandle(pipe.handle_to_self.Pass()); -} - -void MojoWebUIController::AddMojoResourcePath(const std::string& path, - int resource_id) { - if (!mojo_data_source_) { - mojo_data_source_ = content::WebUIDataSource::AddMojoDataSource( - Profile::FromWebUI(web_ui())); - } - mojo_data_source_->AddResourcePath(path, resource_id); -} |