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

Side by Side Diff: examples/nesting_app/nesting_app.cc

Issue 943053003: Simple multi-url support for mojo apps (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: hate Created 5 years, 9 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 unified diff | Download patch
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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "examples/bitmap_uploader/bitmap_uploader.h" 9 #include "examples/bitmap_uploader/bitmap_uploader.h"
10 #include "examples/window_manager/window_manager.mojom.h" 10 #include "examples/window_manager/window_manager.mojom.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 private: 44 private:
45 // Overridden from ApplicationDelegate: 45 // Overridden from ApplicationDelegate:
46 virtual void Initialize(ApplicationImpl* app) override { 46 virtual void Initialize(ApplicationImpl* app) override {
47 shell_ = app->shell(); 47 shell_ = app->shell();
48 view_manager_client_factory_.reset( 48 view_manager_client_factory_.reset(
49 new ViewManagerClientFactory(app->shell(), this)); 49 new ViewManagerClientFactory(app->shell(), this));
50 } 50 }
51 51
52 // Overridden from ApplicationImpl: 52 // Overridden from ApplicationImpl:
53 virtual bool ConfigureIncomingConnection( 53 virtual bool ConfigureIncomingConnection(
54 ApplicationConnection* connection) override { 54 ApplicationConnection* connection, const std::string& url) override {
55 connection->ConnectToService(&window_manager_); 55 connection->ConnectToService(&window_manager_);
56 connection->AddService(view_manager_client_factory_.get()); 56 connection->AddService(view_manager_client_factory_.get());
57 return true; 57 return true;
58 } 58 }
59 59
60 // Overridden from ViewManagerDelegate: 60 // Overridden from ViewManagerDelegate:
61 virtual void OnEmbed(View* root, 61 virtual void OnEmbed(View* root,
62 InterfaceRequest<ServiceProvider> services, 62 InterfaceRequest<ServiceProvider> services,
63 ServiceProviderPtr exposed_services) override { 63 ServiceProviderPtr exposed_services) override {
64 root->AddObserver(this); 64 root->AddObserver(this);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 DISALLOW_COPY_AND_ASSIGN(NestingApp); 99 DISALLOW_COPY_AND_ASSIGN(NestingApp);
100 }; 100 };
101 101
102 } // namespace examples 102 } // namespace examples
103 } // namespace mojo 103 } // namespace mojo
104 104
105 MojoResult MojoMain(MojoHandle shell_handle) { 105 MojoResult MojoMain(MojoHandle shell_handle) {
106 mojo::ApplicationRunnerChromium runner(new mojo::examples::NestingApp); 106 mojo::ApplicationRunnerChromium runner(new mojo::examples::NestingApp);
107 return runner.Run(shell_handle); 107 return runner.Run(shell_handle);
108 } 108 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698