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 "sky/tools/debugger/debugger.h" | 5 #include "sky/tools/debugger/debugger.h" |
6 | 6 |
7 #include "mojo/services/window_manager/basic_focus_rules.h" | 7 #include "mojo/services/window_manager/basic_focus_rules.h" |
8 | 8 |
9 namespace sky { | 9 namespace sky { |
10 namespace debugger { | 10 namespace debugger { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 | 53 |
54 root_ = root; | 54 root_ = root; |
55 root_->AddObserver(this); | 55 root_->AddObserver(this); |
56 | 56 |
57 window_manager_app_->SetViewportSize(gfx::Size(320, 640)); | 57 window_manager_app_->SetViewportSize(gfx::Size(320, 640)); |
58 | 58 |
59 content_ = mojo::View::Create(view_manager_); | 59 content_ = mojo::View::Create(view_manager_); |
60 content_->SetBounds(root_->bounds()); | 60 content_->SetBounds(root_->bounds()); |
61 root_->AddChild(content_); | 61 root_->AddChild(content_); |
62 | 62 |
63 window_manager_app_->InitFocus(scoped_ptr<mojo::FocusRules>( | 63 window_manager_app_->InitFocus( |
64 new mojo::BasicFocusRules(window_manager_app_.get(), content_))); | 64 scoped_ptr<mojo::FocusRules>(new mojo::BasicFocusRules(content_))); |
65 | 65 |
66 if (!pending_url_.empty()) | 66 if (!pending_url_.empty()) |
67 NavigateToURL(pending_url_); | 67 NavigateToURL(pending_url_); |
68 } | 68 } |
69 | 69 |
70 void SkyDebugger::OnViewManagerDisconnected(mojo::ViewManager* view_manager) { | 70 void SkyDebugger::OnViewManagerDisconnected(mojo::ViewManager* view_manager) { |
71 view_manager_ = nullptr; | 71 view_manager_ = nullptr; |
72 root_ = nullptr; | 72 root_ = nullptr; |
73 } | 73 } |
74 | 74 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 } | 125 } |
126 | 126 |
127 void SkyDebugger::InjectInspector() { | 127 void SkyDebugger::InjectInspector() { |
128 InspectorServicePtr inspector_service; | 128 InspectorServicePtr inspector_service; |
129 mojo::ConnectToService(viewer_services_.get(), &inspector_service); | 129 mojo::ConnectToService(viewer_services_.get(), &inspector_service); |
130 inspector_service->Inject(); | 130 inspector_service->Inject(); |
131 } | 131 } |
132 | 132 |
133 } // namespace debugger | 133 } // namespace debugger |
134 } // namespace sky | 134 } // namespace sky |
OLD | NEW |