Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: sky/tools/debugger/debugger.cc

Issue 818583002: Moves Create() off of View and onto ViewManager (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: merge 2 trunk Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « services/window_manager/main.cc ('k') | sky/tools/tester/tester.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « services/window_manager/main.cc ('k') | sky/tools/tester/tester.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698