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

Side by Side Diff: sky/tools/tester/tester.cc

Issue 716043002: Implement event sender service for testing (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « sky/tools/tester/test_runner.h ('k') | sky/viewer/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <iostream> 5 #include <iostream>
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/memory/weak_ptr.h" 7 #include "base/memory/weak_ptr.h"
8 #include "mojo/application/application_runner_chromium.h" 8 #include "mojo/application/application_runner_chromium.h"
9 #include "mojo/public/c/system/main.h" 9 #include "mojo/public/c/system/main.h"
10 #include "mojo/public/cpp/application/application_delegate.h" 10 #include "mojo/public/cpp/application/application_delegate.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // Overridden from mojo::ApplicationDelegate: 49 // Overridden from mojo::ApplicationDelegate:
50 virtual void Initialize(mojo::ApplicationImpl* impl) override { 50 virtual void Initialize(mojo::ApplicationImpl* impl) override {
51 window_manager_app_->Initialize(impl); 51 window_manager_app_->Initialize(impl);
52 52
53 if (impl->args().size() >= 2) 53 if (impl->args().size() >= 2)
54 url_from_args_ = impl->args()[1]; 54 url_from_args_ = impl->args()[1];
55 } 55 }
56 virtual bool ConfigureIncomingConnection( 56 virtual bool ConfigureIncomingConnection(
57 mojo::ApplicationConnection* connection) override { 57 mojo::ApplicationConnection* connection) override {
58 window_manager_app_->ConfigureIncomingConnection(connection); 58 window_manager_app_->ConfigureIncomingConnection(connection);
59 if (test_runner_)
eseidel 2014/11/12 03:18:54 Why the null check?
abarth-chromium 2014/11/12 03:19:56 Someone could be connecting while we aren't runnin
abarth-chromium 2014/11/12 03:19:56 Someone could be connecting while we aren't runnin
60 connection->AddService(test_runner_->test_harness_factory());
59 return true; 61 return true;
60 } 62 }
61 63
62 // Overridden from mojo::ViewManagerDelegate: 64 // Overridden from mojo::ViewManagerDelegate:
63 virtual void OnEmbed( 65 virtual void OnEmbed(
64 mojo::ViewManager* view_manager, 66 mojo::ViewManager* view_manager,
65 mojo::View* root, 67 mojo::View* root,
66 mojo::ServiceProviderImpl* exported_services, 68 mojo::ServiceProviderImpl* exported_services,
67 scoped_ptr<mojo::ServiceProvider> remote_service_provider) override { 69 scoped_ptr<mojo::ServiceProvider> remote_service_provider) override {
68 view_manager_ = view_manager; 70 view_manager_ = view_manager;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 DISALLOW_COPY_AND_ASSIGN(SkyTester); 139 DISALLOW_COPY_AND_ASSIGN(SkyTester);
138 }; 140 };
139 141
140 } // namespace tester 142 } // namespace tester
141 } // namespace examples 143 } // namespace examples
142 144
143 MojoResult MojoMain(MojoHandle shell_handle) { 145 MojoResult MojoMain(MojoHandle shell_handle) {
144 mojo::ApplicationRunnerChromium runner(new sky::tester::SkyTester); 146 mojo::ApplicationRunnerChromium runner(new sky::tester::SkyTester);
145 return runner.Run(shell_handle); 147 return runner.Run(shell_handle);
146 } 148 }
OLDNEW
« no previous file with comments | « sky/tools/tester/test_runner.h ('k') | sky/viewer/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698