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

Unified Diff: components/native_viewport/native_viewport_application_delegate.cc

Issue 1131523007: Move NativeViewport service into view_manager. This is a file move only. Further merging will happe… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 7 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: components/native_viewport/native_viewport_application_delegate.cc
diff --git a/components/native_viewport/native_viewport_application_delegate.cc b/components/native_viewport/native_viewport_application_delegate.cc
deleted file mode 100644
index 8927d2ada79653c970de2411e6d19d7afee0e073..0000000000000000000000000000000000000000
--- a/components/native_viewport/native_viewport_application_delegate.cc
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright 2015 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 "components/native_viewport/native_viewport_application_delegate.h"
-
-#include "base/command_line.h"
-#include "components/native_viewport/native_viewport_impl.h"
-#include "components/native_viewport/public/cpp/args.h"
-#include "mojo/application/public/cpp/application_connection.h"
-#include "mojo/application/public/cpp/application_impl.h"
-#include "ui/events/event_switches.h"
-#include "ui/events/platform/platform_event_source.h"
-#include "ui/gl/gl_surface.h"
-
-namespace native_viewport {
-
-NativeViewportApplicationDelegate::NativeViewportApplicationDelegate()
- : is_headless_(false) {
-}
-
-NativeViewportApplicationDelegate::~NativeViewportApplicationDelegate() {
-}
-
-void NativeViewportApplicationDelegate::Initialize(
- mojo::ApplicationImpl* application) {
- tracing_.Initialize(application);
-
- base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
- is_headless_ = command_line->HasSwitch(mojo::kUseHeadlessConfig);
- if (!is_headless_) {
- event_source_ = ui::PlatformEventSource::CreateDefault();
- if (command_line->HasSwitch(mojo::kUseTestConfig))
- gfx::GLSurface::InitializeOneOffForTests();
- else
- gfx::GLSurface::InitializeOneOff();
- }
-}
-
-bool NativeViewportApplicationDelegate::ConfigureIncomingConnection(
- mojo::ApplicationConnection* connection) {
- connection->AddService<mojo::NativeViewport>(this);
- connection->AddService<mojo::Gpu>(this);
- return true;
-}
-
-void NativeViewportApplicationDelegate::Create(
- mojo::ApplicationConnection* connection,
- mojo::InterfaceRequest<mojo::NativeViewport> request) {
- if (!gpu_state_.get())
- gpu_state_ = new gles2::GpuState;
- new NativeViewportImpl(is_headless_, gpu_state_, request.Pass(),
- app_lifetime_helper_.CreateAppRefCount());
-}
-
-void NativeViewportApplicationDelegate::Create(
- mojo::ApplicationConnection* connection,
- mojo::InterfaceRequest<mojo::Gpu> request) {
- if (!gpu_state_.get())
- gpu_state_ = new gles2::GpuState;
- new gles2::GpuImpl(request.Pass(), gpu_state_);
-}
-
-} // namespace native_viewport
« no previous file with comments | « components/native_viewport/native_viewport_application_delegate.h ('k') | components/native_viewport/native_viewport_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698