diff options
author | fsamuel <fsamuel@chromium.org> | 2015-06-08 11:12:05 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-08 18:13:22 +0000 |
commit | df4ca35a69a71ca175d6ce81dc499b615bb0c8e5 (patch) | |
tree | 91c10f715b81d13c7e9c8a36a39a821a2ca44bea /mojo | |
parent | e5acfbccce659364606758b687b90488e2f44be2 (diff) | |
download | chromium_src-df4ca35a69a71ca175d6ce81dc499b615bb0c8e5.zip chromium_src-df4ca35a69a71ca175d6ce81dc499b615bb0c8e5.tar.gz chromium_src-df4ca35a69a71ca175d6ce81dc499b615bb0c8e5.tar.bz2 |
Mandoline: Remove native_viewport.mojom
native_viewport mojom + app add a lot of unnecessary complexity. This CL removes native_viewport entirely and replaces it with platform_viewport
that is managed by the DefaultDisplayManager.
BUG=487881
Test=internal change only.
Committed: https://crrev.com/3a4eab3f2f4fd8f7c7eb4d195c0e86a47e085d98
Cr-Commit-Position: refs/heads/master@{#333183}
patch from issue 1149083010 at patchset 250001 (http://crrev.com/1149083010#ps250001)
Review URL: https://codereview.chromium.org/1153163004
Cr-Commit-Position: refs/heads/master@{#333294}
Diffstat (limited to 'mojo')
-rw-r--r-- | mojo/runner/android/native_viewport_application_loader.cc | 55 | ||||
-rw-r--r-- | mojo/runner/android/native_viewport_application_loader.h | 58 |
2 files changed, 0 insertions, 113 deletions
diff --git a/mojo/runner/android/native_viewport_application_loader.cc b/mojo/runner/android/native_viewport_application_loader.cc deleted file mode 100644 index 55979c7..0000000 --- a/mojo/runner/android/native_viewport_application_loader.cc +++ /dev/null @@ -1,55 +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 "mojo/runner/android/native_viewport_application_loader.h" - -#include "components/view_manager/gles2/gpu_state.h" -#include "components/view_manager/native_viewport/native_viewport_impl.h" -#include "mojo/application/public/cpp/application_impl.h" - -namespace mojo { -namespace runner { - -NativeViewportApplicationLoader::NativeViewportApplicationLoader() { -} - -NativeViewportApplicationLoader::~NativeViewportApplicationLoader() { -} - -void NativeViewportApplicationLoader::Load( - const GURL& url, - InterfaceRequest<Application> application_request) { - DCHECK(application_request.is_pending()); - app_.reset(new ApplicationImpl(this, application_request.Pass())); -} - -bool NativeViewportApplicationLoader::ConfigureIncomingConnection( - ApplicationConnection* connection) { - connection->AddService<NativeViewport>(this); - connection->AddService<Gpu>(this); - return true; -} - -void NativeViewportApplicationLoader::Create( - ApplicationConnection* connection, - InterfaceRequest<NativeViewport> request) { - if (!gpu_state_) - gpu_state_ = new gles2::GpuState; - // Pass a null AppRefCount because on Android the NativeViewPort app must - // live on the main thread and we don't want to exit that when all the native - // viewports are gone. - new native_viewport::NativeViewportImpl( - false, gpu_state_, request.Pass(), - make_scoped_ptr<mojo::AppRefCount>(nullptr)); -} - -void NativeViewportApplicationLoader::Create(ApplicationConnection* connection, - InterfaceRequest<Gpu> request) { - if (!gpu_state_) - gpu_state_ = new gles2::GpuState; - new gles2::GpuImpl(request.Pass(), gpu_state_); -} - -} // namespace runner -} // namespace mojo diff --git a/mojo/runner/android/native_viewport_application_loader.h b/mojo/runner/android/native_viewport_application_loader.h deleted file mode 100644 index 25b02fd..0000000 --- a/mojo/runner/android/native_viewport_application_loader.h +++ /dev/null @@ -1,58 +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. - -#ifndef MOJO_RUNNER_ANDROID_NATIVE_VIEWPORT_APPLICATION_LOADER_H_ -#define MOJO_RUNNER_ANDROID_NATIVE_VIEWPORT_APPLICATION_LOADER_H_ - -#include "components/view_manager/gles2/gpu_impl.h" -#include "components/view_manager/public/interfaces/gpu.mojom.h" -#include "components/view_manager/public/interfaces/native_viewport.mojom.h" -#include "mojo/application/public/cpp/application_delegate.h" -#include "mojo/application/public/cpp/interface_factory.h" -#include "mojo/shell/application_loader.h" - -namespace gles2 { -class GpuState; -} - -namespace mojo { - -class ApplicationImpl; - -namespace runner { - -class NativeViewportApplicationLoader : public shell::ApplicationLoader, - public ApplicationDelegate, - public InterfaceFactory<NativeViewport>, - public InterfaceFactory<Gpu> { - public: - NativeViewportApplicationLoader(); - ~NativeViewportApplicationLoader(); - - private: - // ApplicationLoader implementation. - void Load(const GURL& url, - InterfaceRequest<Application> application_request) override; - - // ApplicationDelegate implementation. - bool ConfigureIncomingConnection(ApplicationConnection* connection) override; - - // InterfaceFactory<NativeViewport> implementation. - void Create(ApplicationConnection* connection, - InterfaceRequest<NativeViewport> request) override; - - // InterfaceFactory<Gpu> implementation. - void Create(ApplicationConnection* connection, - InterfaceRequest<Gpu> request) override; - - scoped_refptr<gles2::GpuState> gpu_state_; - scoped_ptr<ApplicationImpl> app_; - - DISALLOW_COPY_AND_ASSIGN(NativeViewportApplicationLoader); -}; - -} // namespace runner -} // namespace mojo - -#endif // MOJO_RUNNER_ANDROID_NATIVE_VIEWPORT_APPLICATION_LOADER_H_ |