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

Side by Side Diff: mojo/aura/window_tree_host_mojo.cc

Issue 289063015: Mojo: Remove SetClient from generated interfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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/apps/js/test/js_to_cpp_unittest.cc ('k') | mojo/examples/compositor_app/compositor_app.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 (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/aura/window_tree_host_mojo.h" 5 #include "mojo/aura/window_tree_host_mojo.h"
6 6
7 #include "mojo/aura/context_factory_mojo.h" 7 #include "mojo/aura/context_factory_mojo.h"
8 #include "mojo/geometry/geometry_type_converters.h" 8 #include "mojo/geometry/geometry_type_converters.h"
9 #include "mojo/public/c/gles2/gles2.h" 9 #include "mojo/public/c/gles2/gles2.h"
10 #include "mojo/public/cpp/bindings/allocation_scope.h" 10 #include "mojo/public/cpp/bindings/allocation_scope.h"
(...skipping 14 matching lines...) Expand all
25 //////////////////////////////////////////////////////////////////////////////// 25 ////////////////////////////////////////////////////////////////////////////////
26 // WindowTreeHostMojo, public: 26 // WindowTreeHostMojo, public:
27 27
28 WindowTreeHostMojo::WindowTreeHostMojo( 28 WindowTreeHostMojo::WindowTreeHostMojo(
29 NativeViewportPtr viewport, 29 NativeViewportPtr viewport,
30 const gfx::Rect& bounds, 30 const gfx::Rect& bounds,
31 const base::Callback<void()>& compositor_created_callback) 31 const base::Callback<void()>& compositor_created_callback)
32 : native_viewport_(viewport.Pass()), 32 : native_viewport_(viewport.Pass()),
33 compositor_created_callback_(compositor_created_callback), 33 compositor_created_callback_(compositor_created_callback),
34 bounds_(bounds) { 34 bounds_(bounds) {
35 native_viewport_->SetClient(this); 35 native_viewport_.set_client(this);
36 36
37 AllocationScope scope; 37 AllocationScope scope;
38 native_viewport_->Create(bounds); 38 native_viewport_->Create(bounds);
39 39
40 ScopedMessagePipeHandle gles2_handle, gles2_client_handle; 40 ScopedMessagePipeHandle gles2_handle, gles2_client_handle;
41 CreateMessagePipe(&gles2_handle, &gles2_client_handle); 41 CreateMessagePipe(&gles2_handle, &gles2_client_handle);
42 42
43 // The ContextFactory must exist before any Compositors are created. 43 // The ContextFactory must exist before any Compositors are created.
44 if (context_factory_) { 44 if (context_factory_) {
45 ui::ContextFactory::SetInstance(NULL); 45 ui::ContextFactory::SetInstance(NULL);
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 event.flags(), event.key_data().is_char()); 171 event.flags(), event.key_data().is_char());
172 SendEventToProcessor(&ev); 172 SendEventToProcessor(&ev);
173 break; 173 break;
174 } 174 }
175 // TODO(beng): touch, etc. 175 // TODO(beng): touch, etc.
176 } 176 }
177 callback.Run(); 177 callback.Run();
178 }; 178 };
179 179
180 } // namespace mojo 180 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/apps/js/test/js_to_cpp_unittest.cc ('k') | mojo/examples/compositor_app/compositor_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698