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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 content_ = mojo::View::Create(view_manager_); | 67 content_ = mojo::View::Create(view_manager_); |
68 content_->SetBounds(root_->bounds()); | 68 content_->SetBounds(root_->bounds()); |
69 root_->AddChild(content_); | 69 root_->AddChild(content_); |
70 | 70 |
71 window_manager_app_->InitFocus( | 71 window_manager_app_->InitFocus( |
72 new FocusRules(window_manager_app_.get(), content_)); | 72 new FocusRules(window_manager_app_.get(), content_)); |
73 } | 73 } |
74 | 74 |
75 virtual void OnViewManagerDisconnected( | 75 virtual void OnViewManagerDisconnected( |
76 mojo::ViewManager* view_manager) override { | 76 mojo::ViewManager* view_manager) override { |
| 77 CHECK(false); // FIXME: This is dead code, why? |
77 view_manager_ = nullptr; | 78 view_manager_ = nullptr; |
78 root_ = nullptr; | 79 root_ = nullptr; |
79 } | 80 } |
80 | 81 |
81 virtual void OnViewDestroyed(mojo::View* view) override { | 82 virtual void OnViewDestroyed(mojo::View* view) override { |
| 83 CHECK(false); // FIXME: This is dead code, why? |
82 view->RemoveObserver(this); | 84 view->RemoveObserver(this); |
83 } | 85 } |
84 | 86 |
85 virtual void OnViewBoundsChanged(mojo::View* view, | 87 virtual void OnViewBoundsChanged(mojo::View* view, |
86 const gfx::Rect& old_bounds, | 88 const gfx::Rect& old_bounds, |
87 const gfx::Rect& new_bounds) override { | 89 const gfx::Rect& new_bounds) override { |
88 content_->SetBounds(new_bounds); | 90 content_->SetBounds(new_bounds); |
89 } | 91 } |
90 | 92 |
91 // Overridden from InterfaceFactory<Debugger> | 93 // Overridden from InterfaceFactory<Debugger> |
(...skipping 15 matching lines...) Expand all Loading... |
107 | 109 |
108 DISALLOW_COPY_AND_ASSIGN(SkyDebugger); | 110 DISALLOW_COPY_AND_ASSIGN(SkyDebugger); |
109 }; | 111 }; |
110 | 112 |
111 } // namespace sky | 113 } // namespace sky |
112 | 114 |
113 MojoResult MojoMain(MojoHandle shell_handle) { | 115 MojoResult MojoMain(MojoHandle shell_handle) { |
114 mojo::ApplicationRunnerChromium runner(new sky::SkyDebugger); | 116 mojo::ApplicationRunnerChromium runner(new sky::SkyDebugger); |
115 return runner.Run(shell_handle); | 117 return runner.Run(shell_handle); |
116 } | 118 } |
OLD | NEW |