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

Unified Diff: sky/viewer/viewer.cc

Issue 1235093002: Move sky_viewer into services/sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: again Created 5 years, 5 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
« no previous file with comments | « sky/viewer/runtime_flags.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/viewer/viewer.cc
diff --git a/sky/viewer/viewer.cc b/sky/viewer/viewer.cc
deleted file mode 100644
index 6494bb2a3a2839301c0fd978b10dd134d5b405a1..0000000000000000000000000000000000000000
--- a/sky/viewer/viewer.cc
+++ /dev/null
@@ -1,73 +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 "base/files/file_path.h"
-#include "base/message_loop/message_loop.h"
-#include "base/threading/thread.h"
-#include "mojo/application/application_runner_chromium.h"
-#include "mojo/common/tracing_impl.h"
-#include "mojo/icu/icu.h"
-#include "mojo/public/c/system/main.h"
-#include "mojo/public/cpp/application/application_connection.h"
-#include "mojo/public/cpp/application/application_delegate.h"
-#include "mojo/public/cpp/application/application_impl.h"
-#include "mojo/public/cpp/application/interface_factory_impl.h"
-#include "mojo/services/content_handler/public/interfaces/content_handler.mojom.h"
-#include "sky/engine/public/web/Sky.h"
-#include "sky/engine/public/web/WebRuntimeFeatures.h"
-#include "sky/services/platform/platform_impl.h"
-#include "sky/viewer/content_handler_impl.h"
-#include "sky/viewer/document_view.h"
-#include "sky/viewer/runtime_flags.h"
-
-namespace sky {
-
-class Viewer : public mojo::ApplicationDelegate,
- public mojo::InterfaceFactory<mojo::ContentHandler> {
- public:
- Viewer() {}
-
- ~Viewer() override { blink::shutdown(); }
-
- private:
- // Overridden from ApplicationDelegate:
- void Initialize(mojo::ApplicationImpl* app) override {
- RuntimeFlags::Initialize(app);
-
- blink::WebRuntimeFeatures::enableObservatory(!RuntimeFlags::Get().testing());
-
- mojo::NetworkServicePtr network_service;
- app->ConnectToService("mojo:authenticated_network_service",
- &network_service);
- platform_impl_.reset(new PlatformImpl(network_service.Pass()));
- blink::initialize(platform_impl_.get());
-
- mojo::icu::Initialize(app);
- tracing_.Initialize(app);
- }
-
- bool ConfigureIncomingConnection(
- mojo::ApplicationConnection* connection) override {
- connection->AddService<mojo::ContentHandler>(this);
- return true;
- }
-
- // Overridden from InterfaceFactory<ContentHandler>
- void Create(mojo::ApplicationConnection* connection,
- mojo::InterfaceRequest<mojo::ContentHandler> request) override {
- new ContentHandlerImpl(request.Pass());
- }
-
- scoped_ptr<PlatformImpl> platform_impl_;
- mojo::TracingImpl tracing_;
-
- DISALLOW_COPY_AND_ASSIGN(Viewer);
-};
-
-} // namespace sky
-
-MojoResult MojoMain(MojoHandle application_request) {
- mojo::ApplicationRunnerChromium runner(new sky::Viewer);
- return runner.Run(application_request);
-}
« no previous file with comments | « sky/viewer/runtime_flags.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698