| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "base/basictypes.h" | |
| 6 #include "mojo/public/cpp/application/application.h" | |
| 7 #include "mojo/services/public/cpp/view_manager/view.h" | |
| 8 #include "mojo/services/public/cpp/view_manager/view_manager.h" | |
| 9 #include "mojo/services/public/cpp/view_manager/view_tree_node.h" | |
| 10 | |
| 11 namespace mojo { | |
| 12 namespace examples { | |
| 13 | |
| 14 class EmbeddedApp : public Application { | |
| 15 public: | |
| 16 EmbeddedApp() {} | |
| 17 virtual ~EmbeddedApp() {} | |
| 18 | |
| 19 private: | |
| 20 // Overridden from Application: | |
| 21 virtual void Initialize() MOJO_OVERRIDE { | |
| 22 view_manager_ = new view_manager::ViewManager(this); | |
| 23 view_manager::View* view = view_manager::View::Create(view_manager_); | |
| 24 view_manager_->tree()->SetActiveView(view); | |
| 25 view->SetColor(SK_ColorYELLOW); | |
| 26 } | |
| 27 | |
| 28 view_manager::ViewManager* view_manager_; | |
| 29 | |
| 30 DISALLOW_COPY_AND_ASSIGN(EmbeddedApp); | |
| 31 }; | |
| 32 | |
| 33 } // namespace examples | |
| 34 | |
| 35 // static | |
| 36 Application* Application::Create() { | |
| 37 return new examples::EmbeddedApp; | |
| 38 } | |
| 39 | |
| 40 } // namespace mojo | |
| OLD | NEW |