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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 view_manager_ = view_manager; | 52 view_manager_ = view_manager; |
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 content_->SetVisible(true); |
62 | 63 |
63 window_manager_app_->InitFocus( | 64 window_manager_app_->InitFocus( |
64 scoped_ptr<mojo::FocusRules>(new mojo::BasicFocusRules(content_))); | 65 scoped_ptr<mojo::FocusRules>(new mojo::BasicFocusRules(content_))); |
65 | 66 |
66 if (!pending_url_.empty()) | 67 if (!pending_url_.empty()) |
67 NavigateToURL(pending_url_); | 68 NavigateToURL(pending_url_); |
68 } | 69 } |
69 | 70 |
70 void SkyDebugger::OnViewManagerDisconnected(mojo::ViewManager* view_manager) { | 71 void SkyDebugger::OnViewManagerDisconnected(mojo::ViewManager* view_manager) { |
71 view_manager_ = nullptr; | 72 view_manager_ = nullptr; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 } | 126 } |
126 | 127 |
127 void SkyDebugger::InjectInspector() { | 128 void SkyDebugger::InjectInspector() { |
128 InspectorServicePtr inspector_service; | 129 InspectorServicePtr inspector_service; |
129 mojo::ConnectToService(viewer_services_.get(), &inspector_service); | 130 mojo::ConnectToService(viewer_services_.get(), &inspector_service); |
130 inspector_service->Inject(); | 131 inspector_service->Inject(); |
131 } | 132 } |
132 | 133 |
133 } // namespace debugger | 134 } // namespace debugger |
134 } // namespace sky | 135 } // namespace sky |
OLD | NEW |