| OLD | NEW |
| 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 "mojo/application/application_runner_chromium.h" | 5 #include "mojo/application/application_runner_chromium.h" |
| 6 #include "mojo/public/c/system/main.h" | 6 #include "mojo/public/c/system/main.h" |
| 7 #include "mojo/public/cpp/application/application_delegate.h" | 7 #include "mojo/public/cpp/application/application_delegate.h" |
| 8 #include "mojo/public/cpp/application/application_impl.h" | 8 #include "mojo/public/cpp/application/application_impl.h" |
| 9 #include "mojo/public/cpp/application/connect.h" | 9 #include "mojo/public/cpp/application/connect.h" |
| 10 #include "mojo/public/cpp/application/service_provider_impl.h" | 10 #include "mojo/public/cpp/application/service_provider_impl.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 mojo::ViewManager* view_manager) override { | 70 mojo::ViewManager* view_manager) override { |
| 71 view_manager_ = NULL; | 71 view_manager_ = NULL; |
| 72 root_ = NULL; | 72 root_ = NULL; |
| 73 } | 73 } |
| 74 | 74 |
| 75 virtual void OnViewDestroyed(mojo::View* view) override { | 75 virtual void OnViewDestroyed(mojo::View* view) override { |
| 76 view->RemoveObserver(this); | 76 view->RemoveObserver(this); |
| 77 } | 77 } |
| 78 | 78 |
| 79 virtual void OnViewBoundsChanged(mojo::View* view, | 79 virtual void OnViewBoundsChanged(mojo::View* view, |
| 80 const gfx::Rect& old_bounds, | 80 const mojo::Rect& old_bounds, |
| 81 const gfx::Rect& new_bounds) override { | 81 const mojo::Rect& new_bounds) override { |
| 82 content_->SetBounds(new_bounds); | 82 content_->SetBounds(new_bounds); |
| 83 } | 83 } |
| 84 | 84 |
| 85 scoped_ptr<mojo::WindowManagerApp> window_manager_app_; | 85 scoped_ptr<mojo::WindowManagerApp> window_manager_app_; |
| 86 | 86 |
| 87 mojo::ViewManager* view_manager_; | 87 mojo::ViewManager* view_manager_; |
| 88 mojo::View* root_; | 88 mojo::View* root_; |
| 89 mojo::View* content_; | 89 mojo::View* content_; |
| 90 scoped_ptr<TestHarness> test_harness_; | 90 scoped_ptr<TestHarness> test_harness_; |
| 91 | 91 |
| 92 DISALLOW_COPY_AND_ASSIGN(SkyTester); | 92 DISALLOW_COPY_AND_ASSIGN(SkyTester); |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 } // namespace tester | 95 } // namespace tester |
| 96 } // namespace examples | 96 } // namespace examples |
| 97 | 97 |
| 98 MojoResult MojoMain(MojoHandle shell_handle) { | 98 MojoResult MojoMain(MojoHandle shell_handle) { |
| 99 mojo::ApplicationRunnerChromium runner(new sky::tester::SkyTester); | 99 mojo::ApplicationRunnerChromium runner(new sky::tester::SkyTester); |
| 100 return runner.Run(shell_handle); | 100 return runner.Run(shell_handle); |
| 101 } | 101 } |
| OLD | NEW |