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 "services/window_manager/basic_focus_rules.h" | 7 #include "services/window_manager/basic_focus_rules.h" |
8 | 8 |
9 namespace sky { | 9 namespace sky { |
10 namespace debugger { | 10 namespace debugger { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 void SkyDebugger::OnEmbed( | 46 void SkyDebugger::OnEmbed( |
47 mojo::View* root, | 47 mojo::View* root, |
48 mojo::ServiceProviderImpl* exported_services, | 48 mojo::ServiceProviderImpl* exported_services, |
49 scoped_ptr<mojo::ServiceProvider> imported_services) { | 49 scoped_ptr<mojo::ServiceProvider> imported_services) { |
50 root_ = root; | 50 root_ = root; |
51 root_->AddObserver(this); | 51 root_->AddObserver(this); |
52 | 52 |
53 window_manager_app_->SetViewportSize(gfx::Size(320, 640)); | 53 window_manager_app_->SetViewportSize(gfx::Size(320, 640)); |
54 | 54 |
55 content_ = mojo::View::Create(root->view_manager()); | 55 content_ = root->view_manager()->CreateView(); |
56 content_->SetBounds(root_->bounds()); | 56 content_->SetBounds(root_->bounds()); |
57 root_->AddChild(content_); | 57 root_->AddChild(content_); |
58 content_->SetVisible(true); | 58 content_->SetVisible(true); |
59 | 59 |
60 window_manager_app_->InitFocus( | 60 window_manager_app_->InitFocus( |
61 make_scoped_ptr(new window_manager::BasicFocusRules(content_))); | 61 make_scoped_ptr(new window_manager::BasicFocusRules(content_))); |
62 | 62 |
63 if (!pending_url_.empty()) | 63 if (!pending_url_.empty()) |
64 NavigateToURL(pending_url_); | 64 NavigateToURL(pending_url_); |
65 } | 65 } |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 } | 111 } |
112 | 112 |
113 void SkyDebugger::InjectInspector() { | 113 void SkyDebugger::InjectInspector() { |
114 InspectorServicePtr inspector_service; | 114 InspectorServicePtr inspector_service; |
115 mojo::ConnectToService(viewer_services_.get(), &inspector_service); | 115 mojo::ConnectToService(viewer_services_.get(), &inspector_service); |
116 inspector_service->Inject(); | 116 inspector_service->Inject(); |
117 } | 117 } |
118 | 118 |
119 } // namespace debugger | 119 } // namespace debugger |
120 } // namespace sky | 120 } // namespace sky |
OLD | NEW |