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

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

Issue 317433004: Get view manager client lib unit test harness to run again. Does not get any individual tests worki… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | mojo/examples/window_manager/window_manager.cc » ('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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "mojo/public/cpp/application/application.h" 6 #include "mojo/public/cpp/application/application.h"
7 #include "mojo/services/public/cpp/view_manager/view.h" 7 #include "mojo/services/public/cpp/view_manager/view.h"
8 #include "mojo/services/public/cpp/view_manager/view_manager.h" 8 #include "mojo/services/public/cpp/view_manager/view_manager.h"
9 #include "mojo/services/public/cpp/view_manager/view_tree_node.h" 9 #include "mojo/services/public/cpp/view_manager/view_tree_node.h"
10 10
11 namespace mojo { 11 namespace mojo {
12 namespace examples { 12 namespace examples {
13 13
14 class EmbeddedApp : public Application { 14 class EmbeddedApp : public Application {
15 public: 15 public:
16 EmbeddedApp() {} 16 EmbeddedApp() {}
17 virtual ~EmbeddedApp() {} 17 virtual ~EmbeddedApp() {}
18 18
19 private: 19 private:
20 // Overridden from Application: 20 // Overridden from Application:
21 virtual void Initialize() MOJO_OVERRIDE { 21 virtual void Initialize() MOJO_OVERRIDE {
22 view_manager_ = new view_manager::ViewManager(this); 22 view_manager_ = view_manager::ViewManager::CreateBlocking(this);
23 view_manager::View* view = view_manager::View::Create(view_manager_); 23 view_manager::View* view = view_manager::View::Create(view_manager_);
24 view_manager_->tree()->SetActiveView(view); 24 view_manager_->tree()->SetActiveView(view);
25 view->SetColor(SK_ColorYELLOW); 25 view->SetColor(SK_ColorYELLOW);
26 } 26 }
27 27
28 view_manager::ViewManager* view_manager_; 28 view_manager::ViewManager* view_manager_;
29 29
30 DISALLOW_COPY_AND_ASSIGN(EmbeddedApp); 30 DISALLOW_COPY_AND_ASSIGN(EmbeddedApp);
31 }; 31 };
32 32
33 } // namespace examples 33 } // namespace examples
34 34
35 // static 35 // static
36 Application* Application::Create() { 36 Application* Application::Create() {
37 return new examples::EmbeddedApp; 37 return new examples::EmbeddedApp;
38 } 38 }
39 39
40 } // namespace mojo 40 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | mojo/examples/window_manager/window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698