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

Side by Side Diff: mojo/examples/aura_demo/aura_demo.cc

Issue 617503003: Mojo: MOJO_OVERRIDE -> override in mojo/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 years, 2 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <stdio.h> 5 #include <stdio.h>
6 #include <string> 6 #include <string>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "mojo/application/application_runner_chromium.h" 9 #include "mojo/application/application_runner_chromium.h"
10 #include "mojo/aura/context_factory_mojo.h" 10 #include "mojo/aura/context_factory_mojo.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 virtual void OnViewManagerDisconnected( 154 virtual void OnViewManagerDisconnected(
155 mojo::ViewManager* view_manager) OVERRIDE { 155 mojo::ViewManager* view_manager) OVERRIDE {
156 base::MessageLoop::current()->Quit(); 156 base::MessageLoop::current()->Quit();
157 } 157 }
158 158
159 // WindowTreeHostMojoDelegate: 159 // WindowTreeHostMojoDelegate:
160 virtual void CompositorContentsChanged(const SkBitmap& bitmap) OVERRIDE { 160 virtual void CompositorContentsChanged(const SkBitmap& bitmap) OVERRIDE {
161 root_->SetContents(bitmap); 161 root_->SetContents(bitmap);
162 } 162 }
163 163
164 virtual void Initialize(mojo::ApplicationImpl* app) MOJO_OVERRIDE { 164 virtual void Initialize(mojo::ApplicationImpl* app) override {
165 view_manager_client_factory_.reset( 165 view_manager_client_factory_.reset(
166 new mojo::ViewManagerClientFactory(app->shell(), this)); 166 new mojo::ViewManagerClientFactory(app->shell(), this));
167 aura::Env::CreateInstance(true); 167 aura::Env::CreateInstance(true);
168 context_factory_.reset(new mojo::ContextFactoryMojo); 168 context_factory_.reset(new mojo::ContextFactoryMojo);
169 aura::Env::GetInstance()->set_context_factory(context_factory_.get()); 169 aura::Env::GetInstance()->set_context_factory(context_factory_.get());
170 screen_.reset(mojo::ScreenMojo::Create()); 170 screen_.reset(mojo::ScreenMojo::Create());
171 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get()); 171 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get());
172 } 172 }
173 173
174 virtual bool ConfigureIncomingConnection( 174 virtual bool ConfigureIncomingConnection(
175 mojo::ApplicationConnection* connection) MOJO_OVERRIDE { 175 mojo::ApplicationConnection* connection) override {
176 connection->AddService(view_manager_client_factory_.get()); 176 connection->AddService(view_manager_client_factory_.get());
177 return true; 177 return true;
178 } 178 }
179 179
180 scoped_ptr<DemoWindowTreeClient> window_tree_client_; 180 scoped_ptr<DemoWindowTreeClient> window_tree_client_;
181 181
182 scoped_ptr<ui::ContextFactory> context_factory_; 182 scoped_ptr<ui::ContextFactory> context_factory_;
183 183
184 scoped_ptr<mojo::ScreenMojo> screen_; 184 scoped_ptr<mojo::ScreenMojo> screen_;
185 185
(...skipping 13 matching lines...) Expand all
199 199
200 DISALLOW_COPY_AND_ASSIGN(AuraDemo); 200 DISALLOW_COPY_AND_ASSIGN(AuraDemo);
201 }; 201 };
202 202
203 } // namespace examples 203 } // namespace examples
204 204
205 MojoResult MojoMain(MojoHandle shell_handle) { 205 MojoResult MojoMain(MojoHandle shell_handle) {
206 mojo::ApplicationRunnerChromium runner(new examples::AuraDemo); 206 mojo::ApplicationRunnerChromium runner(new examples::AuraDemo);
207 return runner.Run(shell_handle); 207 return runner.Run(shell_handle);
208 } 208 }
OLDNEW
« no previous file with comments | « mojo/examples/apptest/example_service_impl.h ('k') | mojo/examples/aura_demo/view_manager_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698