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

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

Issue 698543005: Make a pure mojo::View version of the aura::Window FocusController. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Clean things up quickly for commit. 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
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
7 namespace sky { 9 namespace sky {
8 namespace debugger { 10 namespace debugger {
9 11
10 SkyDebugger::SkyDebugger() 12 SkyDebugger::SkyDebugger()
11 : window_manager_app_(new mojo::WindowManagerApp(this, nullptr)), 13 : window_manager_app_(new mojo::WindowManagerApp(this, nullptr)),
12 view_manager_(nullptr), 14 view_manager_(nullptr),
13 root_(nullptr), 15 root_(nullptr),
14 content_(nullptr), 16 content_(nullptr),
15 navigator_host_factory_(this), 17 navigator_host_factory_(this),
16 weak_factory_(this) { 18 weak_factory_(this) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 root_ = root; 54 root_ = root;
53 root_->AddObserver(this); 55 root_->AddObserver(this);
54 56
55 window_manager_app_->SetViewportSize(gfx::Size(320, 640)); 57 window_manager_app_->SetViewportSize(gfx::Size(320, 640));
56 58
57 content_ = mojo::View::Create(view_manager_); 59 content_ = mojo::View::Create(view_manager_);
58 content_->SetBounds(root_->bounds()); 60 content_->SetBounds(root_->bounds());
59 root_->AddChild(content_); 61 root_->AddChild(content_);
60 62
61 window_manager_app_->InitFocus( 63 window_manager_app_->InitFocus(
62 new FocusRules(window_manager_app_.get(), content_)); 64 new mojo::BasicFocusRules(window_manager_app_.get(), content_));
eseidel 2014/11/06 21:33:14 It's kinda silly we have to call InitFocus at all,
63 65
64 if (!pending_url_.empty()) 66 if (!pending_url_.empty())
65 NavigateToURL(pending_url_); 67 NavigateToURL(pending_url_);
66 } 68 }
67 69
68 void SkyDebugger::OnViewManagerDisconnected(mojo::ViewManager* view_manager) { 70 void SkyDebugger::OnViewManagerDisconnected(mojo::ViewManager* view_manager) {
69 view_manager_ = nullptr; 71 view_manager_ = nullptr;
70 root_ = nullptr; 72 root_ = nullptr;
71 } 73 }
72 74
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 } 112 }
111 113
112 void SkyDebugger::InjectInspector() { 114 void SkyDebugger::InjectInspector() {
113 InspectorServicePtr inspector_service; 115 InspectorServicePtr inspector_service;
114 mojo::ConnectToService(viewer_services_.get(), &inspector_service); 116 mojo::ConnectToService(viewer_services_.get(), &inspector_service);
115 inspector_service->Inject(); 117 inspector_service->Inject();
116 } 118 }
117 119
118 } // namespace debugger 120 } // namespace debugger
119 } // namespace sky 121 } // namespace sky
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698