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

Side by Side Diff: mojo/services/view_manager/window_tree_host_impl.cc

Issue 347433003: Fix incorrect position of Native Viewport contents on Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 6 months 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 | Annotate | Revision Log
« no previous file with comments | « mojo/services/native_viewport/native_viewport_win.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "mojo/services/view_manager/window_tree_host_impl.h" 5 #include "mojo/services/view_manager/window_tree_host_impl.h"
6 6
7 #include "mojo/public/c/gles2/gles2.h" 7 #include "mojo/public/c/gles2/gles2.h"
8 #include "mojo/services/public/cpp/geometry/geometry_type_converters.h" 8 #include "mojo/services/public/cpp/geometry/geometry_type_converters.h"
9 #include "mojo/services/view_manager/context_factory_impl.h" 9 #include "mojo/services/view_manager/context_factory_impl.h"
10 #include "ui/aura/env.h" 10 #include "ui/aura/env.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 //////////////////////////////////////////////////////////////////////////////// 129 ////////////////////////////////////////////////////////////////////////////////
130 // WindowTreeHostImpl, NativeViewportClient implementation: 130 // WindowTreeHostImpl, NativeViewportClient implementation:
131 131
132 void WindowTreeHostImpl::OnCreated() { 132 void WindowTreeHostImpl::OnCreated() {
133 CreateCompositor(GetAcceleratedWidget()); 133 CreateCompositor(GetAcceleratedWidget());
134 compositor_created_callback_.Run(); 134 compositor_created_callback_.Run();
135 } 135 }
136 136
137 void WindowTreeHostImpl::OnBoundsChanged(RectPtr bounds) { 137 void WindowTreeHostImpl::OnBoundsChanged(RectPtr bounds) {
138 bounds_ = bounds.To<gfx::Rect>(); 138 bounds_ = bounds.To<gfx::Rect>();
139 window()->SetBounds(gfx::Rect(bounds_.size()));
140 OnHostResized(bounds_.size()); 139 OnHostResized(bounds_.size());
141 } 140 }
142 141
143 void WindowTreeHostImpl::OnDestroyed() { 142 void WindowTreeHostImpl::OnDestroyed() {
144 base::MessageLoop::current()->Quit(); 143 base::MessageLoop::current()->Quit();
145 } 144 }
146 145
147 void WindowTreeHostImpl::OnEvent(EventPtr event, 146 void WindowTreeHostImpl::OnEvent(EventPtr event,
148 const mojo::Callback<void()>& callback) { 147 const mojo::Callback<void()>& callback) {
149 switch (event->action) { 148 switch (event->action) {
(...skipping 19 matching lines...) Expand all
169 break; 168 break;
170 } 169 }
171 // TODO(beng): touch, etc. 170 // TODO(beng): touch, etc.
172 } 171 }
173 callback.Run(); 172 callback.Run();
174 }; 173 };
175 174
176 } // namespace service 175 } // namespace service
177 } // namespace view_manager 176 } // namespace view_manager
178 } // namespace mojo 177 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/native_viewport/native_viewport_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698