| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/files/file_path.h" | 5 #include "base/files/file_path.h" |
| 6 #include "base/message_loop/message_loop.h" | 6 #include "base/message_loop/message_loop.h" |
| 7 #include "base/threading/thread.h" | 7 #include "base/threading/thread.h" |
| 8 #include "mojo/application/application_runner_chromium.h" | 8 #include "mojo/application/application_runner_chromium.h" |
| 9 #include "mojo/common/tracing_impl.h" | 9 #include "mojo/common/tracing_impl.h" |
| 10 #include "mojo/icu/icu.h" | 10 #include "mojo/icu/icu.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 ~Viewer() override { blink::shutdown(); } | 31 ~Viewer() override { blink::shutdown(); } |
| 32 | 32 |
| 33 private: | 33 private: |
| 34 // Overridden from ApplicationDelegate: | 34 // Overridden from ApplicationDelegate: |
| 35 void Initialize(mojo::ApplicationImpl* app) override { | 35 void Initialize(mojo::ApplicationImpl* app) override { |
| 36 RuntimeFlags::Initialize(app); | 36 RuntimeFlags::Initialize(app); |
| 37 | 37 |
| 38 blink::WebRuntimeFeatures::enableObservatory(!RuntimeFlags::Get().testing())
; | 38 blink::WebRuntimeFeatures::enableObservatory(!RuntimeFlags::Get().testing())
; |
| 39 | 39 |
| 40 mojo::NetworkServicePtr network_service; | 40 mojo::NetworkServicePtr network_service; |
| 41 app->ConnectToService("mojo:network_service", &network_service); | 41 app->ConnectToService("mojo:authenticated_network_service", |
| 42 &network_service); |
| 42 platform_impl_.reset(new PlatformImpl(network_service.Pass())); | 43 platform_impl_.reset(new PlatformImpl(network_service.Pass())); |
| 43 blink::initialize(platform_impl_.get()); | 44 blink::initialize(platform_impl_.get()); |
| 44 | 45 |
| 45 mojo::icu::Initialize(app); | 46 mojo::icu::Initialize(app); |
| 46 tracing_.Initialize(app); | 47 tracing_.Initialize(app); |
| 47 } | 48 } |
| 48 | 49 |
| 49 bool ConfigureIncomingConnection( | 50 bool ConfigureIncomingConnection( |
| 50 mojo::ApplicationConnection* connection) override { | 51 mojo::ApplicationConnection* connection) override { |
| 51 connection->AddService<mojo::ContentHandler>(this); | 52 connection->AddService<mojo::ContentHandler>(this); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 63 | 64 |
| 64 DISALLOW_COPY_AND_ASSIGN(Viewer); | 65 DISALLOW_COPY_AND_ASSIGN(Viewer); |
| 65 }; | 66 }; |
| 66 | 67 |
| 67 } // namespace sky | 68 } // namespace sky |
| 68 | 69 |
| 69 MojoResult MojoMain(MojoHandle application_request) { | 70 MojoResult MojoMain(MojoHandle application_request) { |
| 70 mojo::ApplicationRunnerChromium runner(new sky::Viewer); | 71 mojo::ApplicationRunnerChromium runner(new sky::Viewer); |
| 71 return runner.Run(application_request); | 72 return runner.Run(application_request); |
| 72 } | 73 } |
| OLD | NEW |