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

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

Issue 718573002: Revert "Remove aura and make a pure mojo::View version of the aura::Window FocusController." (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/tools/debugger/debugger.h ('k') | sky/tools/debugger/focus_rules.h » ('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 "mojo/services/window_manager/basic_focus_rules.h"
8
9 namespace sky { 7 namespace sky {
10 namespace debugger { 8 namespace debugger {
11 9
12 SkyDebugger::SkyDebugger() 10 SkyDebugger::SkyDebugger()
13 : window_manager_app_(new mojo::WindowManagerApp(this, nullptr)), 11 : window_manager_app_(new mojo::WindowManagerApp(this, nullptr)),
14 view_manager_(nullptr), 12 view_manager_(nullptr),
15 root_(nullptr), 13 root_(nullptr),
16 content_(nullptr), 14 content_(nullptr),
17 navigator_host_factory_(this), 15 navigator_host_factory_(this),
18 weak_factory_(this) { 16 weak_factory_(this) {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 51
54 root_ = root; 52 root_ = root;
55 root_->AddObserver(this); 53 root_->AddObserver(this);
56 54
57 window_manager_app_->SetViewportSize(gfx::Size(320, 640)); 55 window_manager_app_->SetViewportSize(gfx::Size(320, 640));
58 56
59 content_ = mojo::View::Create(view_manager_); 57 content_ = mojo::View::Create(view_manager_);
60 content_->SetBounds(root_->bounds()); 58 content_->SetBounds(root_->bounds());
61 root_->AddChild(content_); 59 root_->AddChild(content_);
62 60
63 window_manager_app_->InitFocus(scoped_ptr<mojo::FocusRules>( 61 window_manager_app_->InitFocus(
64 new mojo::BasicFocusRules(window_manager_app_.get(), content_))); 62 new FocusRules(window_manager_app_.get(), content_));
65 63
66 if (!pending_url_.empty()) 64 if (!pending_url_.empty())
67 NavigateToURL(pending_url_); 65 NavigateToURL(pending_url_);
68 } 66 }
69 67
70 void SkyDebugger::OnViewManagerDisconnected(mojo::ViewManager* view_manager) { 68 void SkyDebugger::OnViewManagerDisconnected(mojo::ViewManager* view_manager) {
71 view_manager_ = nullptr; 69 view_manager_ = nullptr;
72 root_ = nullptr; 70 root_ = nullptr;
73 } 71 }
74 72
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 } 113 }
116 114
117 void SkyDebugger::InjectInspector() { 115 void SkyDebugger::InjectInspector() {
118 InspectorServicePtr inspector_service; 116 InspectorServicePtr inspector_service;
119 mojo::ConnectToService(viewer_services_.get(), &inspector_service); 117 mojo::ConnectToService(viewer_services_.get(), &inspector_service);
120 inspector_service->Inject(); 118 inspector_service->Inject();
121 } 119 }
122 120
123 } // namespace debugger 121 } // namespace debugger
124 } // namespace sky 122 } // namespace sky
OLDNEW
« no previous file with comments | « sky/tools/debugger/debugger.h ('k') | sky/tools/debugger/focus_rules.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698