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

Side by Side Diff: mojo/examples/pepper_container_app/pepper_container_app.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/examples/compositor_app/compositor_app.cc ('k') | mojo/examples/sample_app/sample_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 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 "base/macros.h" 5 #include "base/macros.h"
6 #include "base/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "mojo/examples/pepper_container_app/mojo_ppapi_globals.h" 10 #include "mojo/examples/pepper_container_app/mojo_ppapi_globals.h"
(...skipping 27 matching lines...) Expand all
38 public NativeViewportClient, 38 public NativeViewportClient,
39 public MojoPpapiGlobals::Delegate { 39 public MojoPpapiGlobals::Delegate {
40 public: 40 public:
41 explicit PepperContainerApp(MojoHandle shell_handle) 41 explicit PepperContainerApp(MojoHandle shell_handle)
42 : Application(shell_handle), 42 : Application(shell_handle),
43 ppapi_globals_(this), 43 ppapi_globals_(this),
44 plugin_module_(new PluginModule) { 44 plugin_module_(new PluginModule) {
45 mojo::AllocationScope scope; 45 mojo::AllocationScope scope;
46 46
47 ConnectTo("mojo:mojo_native_viewport_service", &viewport_); 47 ConnectTo("mojo:mojo_native_viewport_service", &viewport_);
48 viewport_->SetClient(this); 48 viewport_.set_client(this);
49 49
50 Rect::Builder rect; 50 Rect::Builder rect;
51 Point::Builder point; 51 Point::Builder point;
52 point.set_x(10); 52 point.set_x(10);
53 point.set_y(10); 53 point.set_y(10);
54 rect.set_position(point.Finish()); 54 rect.set_position(point.Finish());
55 Size::Builder size; 55 Size::Builder size;
56 size.set_width(800); 56 size.set_width(800);
57 size.set_height(600); 57 size.set_height(600);
58 rect.set_size(size.Finish()); 58 rect.set_size(size.Finish());
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 extern "C" PEPPER_CONTAINER_APP_EXPORT MojoResult CDECL MojoMain( 122 extern "C" PEPPER_CONTAINER_APP_EXPORT MojoResult CDECL MojoMain(
123 MojoHandle shell_handle) { 123 MojoHandle shell_handle) {
124 mojo::Environment env; 124 mojo::Environment env;
125 mojo::GLES2Initializer gles2; 125 mojo::GLES2Initializer gles2;
126 base::MessageLoop run_loop; 126 base::MessageLoop run_loop;
127 mojo::examples::PepperContainerApp app(shell_handle); 127 mojo::examples::PepperContainerApp app(shell_handle);
128 128
129 run_loop.Run(); 129 run_loop.Run();
130 return MOJO_RESULT_OK; 130 return MOJO_RESULT_OK;
131 } 131 }
OLDNEW
« no previous file with comments | « mojo/examples/compositor_app/compositor_app.cc ('k') | mojo/examples/sample_app/sample_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698