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

Side by Side Diff: mojo/examples/browser/browser.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 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/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/strings/string_util.h" 6 #include "base/strings/string_util.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "mojo/application/application_runner_chromium.h" 8 #include "mojo/application/application_runner_chromium.h"
9 #include "mojo/common/common_type_converters.h" 9 #include "mojo/common/common_type_converters.h"
10 #include "mojo/examples/window_manager/window_manager.mojom.h" 10 #include "mojo/examples/window_manager/window_manager.mojom.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 root_(NULL), 159 root_(NULL),
160 widget_(NULL) {} 160 widget_(NULL) {}
161 161
162 virtual ~Browser() { 162 virtual ~Browser() {
163 if (root_) 163 if (root_)
164 root_->RemoveObserver(this); 164 root_->RemoveObserver(this);
165 } 165 }
166 166
167 private: 167 private:
168 // Overridden from ApplicationDelegate: 168 // Overridden from ApplicationDelegate:
169 virtual void Initialize(ApplicationImpl* app) MOJO_OVERRIDE { 169 virtual void Initialize(ApplicationImpl* app) override {
170 view_manager_client_factory_.reset( 170 view_manager_client_factory_.reset(
171 new ViewManagerClientFactory(app->shell(), this)); 171 new ViewManagerClientFactory(app->shell(), this));
172 views_init_.reset(new ViewsInit); 172 views_init_.reset(new ViewsInit);
173 app->ConnectToService("mojo:mojo_window_manager", &window_manager_); 173 app->ConnectToService("mojo:mojo_window_manager", &window_manager_);
174 } 174 }
175 175
176 virtual bool ConfigureIncomingConnection(ApplicationConnection* connection) 176 virtual bool ConfigureIncomingConnection(
177 MOJO_OVERRIDE { 177 ApplicationConnection* connection) override {
178 connection->AddService(view_manager_client_factory_.get()); 178 connection->AddService(view_manager_client_factory_.get());
179 return true; 179 return true;
180 } 180 }
181 181
182 void CreateWidget(View* view) { 182 void CreateWidget(View* view) {
183 views::Textfield* textfield = new views::Textfield; 183 views::Textfield* textfield = new views::Textfield;
184 textfield->set_controller(this); 184 textfield->set_controller(this);
185 185
186 views::WidgetDelegateView* widget_delegate = new views::WidgetDelegateView; 186 views::WidgetDelegateView* widget_delegate = new views::WidgetDelegateView;
187 widget_delegate->GetContentsView()->set_background( 187 widget_delegate->GetContentsView()->set_background(
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 DISALLOW_COPY_AND_ASSIGN(Browser); 264 DISALLOW_COPY_AND_ASSIGN(Browser);
265 }; 265 };
266 266
267 } // namespace examples 267 } // namespace examples
268 } // namespace mojo 268 } // namespace mojo
269 269
270 MojoResult MojoMain(MojoHandle shell_handle) { 270 MojoResult MojoMain(MojoHandle shell_handle) {
271 mojo::ApplicationRunnerChromium runner(new mojo::examples::Browser); 271 mojo::ApplicationRunnerChromium runner(new mojo::examples::Browser);
272 return runner.Run(shell_handle); 272 return runner.Run(shell_handle);
273 } 273 }
OLDNEW
« no previous file with comments | « mojo/examples/aura_demo/view_manager_init.cc ('k') | mojo/examples/content_handler_demo/content_handler_demo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698