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

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

Issue 737913002: Dispatch key events to the currently focused window. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Redo FocusController storage so that it is a local property on a view. 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 | « mojo/services/window_manager/window_manager_app.cc ('k') | no next file » | 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" 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 62
63 window_manager_app_->InitFocus(scoped_ptr<mojo::FocusRules>( 63 window_manager_app_->InitFocus(
64 new mojo::BasicFocusRules(window_manager_app_.get(), content_))); 64 scoped_ptr<mojo::FocusRules>(new mojo::BasicFocusRules(content_)));
65 65
66 if (!pending_url_.empty()) 66 if (!pending_url_.empty())
67 NavigateToURL(pending_url_); 67 NavigateToURL(pending_url_);
68 } 68 }
69 69
70 void SkyDebugger::OnViewManagerDisconnected(mojo::ViewManager* view_manager) { 70 void SkyDebugger::OnViewManagerDisconnected(mojo::ViewManager* view_manager) {
71 view_manager_ = nullptr; 71 view_manager_ = nullptr;
72 root_ = nullptr; 72 root_ = nullptr;
73 } 73 }
74 74
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 } 125 }
126 126
127 void SkyDebugger::InjectInspector() { 127 void SkyDebugger::InjectInspector() {
128 InspectorServicePtr inspector_service; 128 InspectorServicePtr inspector_service;
129 mojo::ConnectToService(viewer_services_.get(), &inspector_service); 129 mojo::ConnectToService(viewer_services_.get(), &inspector_service);
130 inspector_service->Inject(); 130 inspector_service->Inject();
131 } 131 }
132 132
133 } // namespace debugger 133 } // namespace debugger
134 } // namespace sky 134 } // namespace sky
OLDNEW
« no previous file with comments | « mojo/services/window_manager/window_manager_app.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698