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

Side by Side Diff: mash/example/views_examples/views_examples_application_delegate.cc

Issue 1674903003: Extract shell methods from ApplicationImpl into a base class, and pass this to Initialize() instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojom
Patch Set: . Created 4 years, 10 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "mash/example/views_examples/views_examples_application_delegate.h" 5 #include "mash/example/views_examples/views_examples_application_delegate.h"
6 6
7 #include "mojo/shell/public/cpp/application_connection.h" 7 #include "mojo/shell/public/cpp/application_connection.h"
8 #include "mojo/shell/public/cpp/application_impl.h" 8 #include "mojo/shell/public/cpp/shell.h"
9 #include "ui/views/examples/example_base.h" 9 #include "ui/views/examples/example_base.h"
10 #include "ui/views/examples/examples_window.h" 10 #include "ui/views/examples/examples_window.h"
11 #include "ui/views/mus/aura_init.h" 11 #include "ui/views/mus/aura_init.h"
12 #include "ui/views/mus/window_manager_connection.h" 12 #include "ui/views/mus/window_manager_connection.h"
13 13
14 ViewsExamplesApplicationDelegate::ViewsExamplesApplicationDelegate() {} 14 ViewsExamplesApplicationDelegate::ViewsExamplesApplicationDelegate() {}
15 15
16 ViewsExamplesApplicationDelegate::~ViewsExamplesApplicationDelegate() { 16 ViewsExamplesApplicationDelegate::~ViewsExamplesApplicationDelegate() {
17 } 17 }
18 18
19 void ViewsExamplesApplicationDelegate::Initialize(mojo::ApplicationImpl* app) { 19 void ViewsExamplesApplicationDelegate::Initialize(mojo::Shell* shell,
20 tracing_.Initialize(app); 20 const std::string& url,
21 aura_init_.reset(new views::AuraInit(app, "views_mus_resources.pak")); 21 uint32_t id) {
22 tracing_.Initialize(shell, url);
23 aura_init_.reset(new views::AuraInit(shell, "views_mus_resources.pak"));
22 24
23 views::WindowManagerConnection::Create(app); 25 views::WindowManagerConnection::Create(shell);
24 26
25 views::examples::ShowExamplesWindow(views::examples::DO_NOTHING_ON_CLOSE, 27 views::examples::ShowExamplesWindow(views::examples::DO_NOTHING_ON_CLOSE,
26 nullptr, nullptr); 28 nullptr, nullptr);
27 } 29 }
28 30
29 bool ViewsExamplesApplicationDelegate::AcceptConnection( 31 bool ViewsExamplesApplicationDelegate::AcceptConnection(
30 mojo::ApplicationConnection* connection) { 32 mojo::ApplicationConnection* connection) {
31 return false; 33 return false;
32 } 34 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698