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

Side by Side Diff: mojo/examples/aura_demo/aura_demo.cc

Issue 131153007: Send size to NativeViewportClient::OnCreated instead of GLES2Client::DidCreateContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, fix various issues Created 6 years, 10 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/main.js ('k') | mojo/examples/aura_demo/root_window_host_mojo.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 <stdio.h> 5 #include <stdio.h>
6 #include <string> 6 #include <string>
7 7
8 #include "base/at_exit.h" 8 #include "base/at_exit.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 AllocationScope scope; 132 AllocationScope scope;
133 shell_->Connect("mojo:mojo_native_viewport_service", client_handle.Pass()); 133 shell_->Connect("mojo:mojo_native_viewport_service", client_handle.Pass());
134 } 134 }
135 135
136 virtual void AcceptConnection(ScopedMessagePipeHandle handle) MOJO_OVERRIDE { 136 virtual void AcceptConnection(ScopedMessagePipeHandle handle) MOJO_OVERRIDE {
137 NOTREACHED() << "AuraDemo can't be connected to."; 137 NOTREACHED() << "AuraDemo can't be connected to.";
138 } 138 }
139 139
140 private: 140 private:
141 void HostContextCreated() { 141 void HostContextCreated() {
142 aura::RootWindow::CreateParams params(gfx::Rect(0, 0, 500, 500)); 142 aura::RootWindow::CreateParams params(
143 gfx::Rect(root_window_host_->bounds().size()));
143 params.host = root_window_host_.get(); 144 params.host = root_window_host_.get();
144 root_window_.reset(new aura::RootWindow(params)); 145 root_window_.reset(new aura::RootWindow(params));
145 root_window_host_->set_delegate(root_window_.get()); 146 root_window_host_->set_delegate(root_window_.get());
146 root_window_->Init(); 147 root_window_->Init();
147 148
148 window_tree_client_.reset(new DemoWindowTreeClient(root_window_->window())); 149 window_tree_client_.reset(new DemoWindowTreeClient(root_window_->window()));
149 150
150 delegate1_.reset(new DemoWindowDelegate(SK_ColorBLUE)); 151 delegate1_.reset(new DemoWindowDelegate(SK_ColorBLUE));
151 window1_ = new aura::Window(delegate1_.get()); 152 window1_ = new aura::Window(delegate1_.get());
152 window1_->Init(aura::WINDOW_LAYER_TEXTURED); 153 window1_->Init(aura::WINDOW_LAYER_TEXTURED);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 // TODO(beng): This crashes in a DCHECK on X11 because this thread's 202 // TODO(beng): This crashes in a DCHECK on X11 because this thread's
202 // MessageLoop is not of TYPE_UI. I think we need a way to build 203 // MessageLoop is not of TYPE_UI. I think we need a way to build
203 // Aura that doesn't define platform-specific stuff. 204 // Aura that doesn't define platform-specific stuff.
204 aura::Env::CreateInstance(); 205 aura::Env::CreateInstance();
205 mojo::examples::AuraDemo app( 206 mojo::examples::AuraDemo app(
206 mojo::MakeScopedHandle(mojo::MessagePipeHandle(shell_handle)).Pass()); 207 mojo::MakeScopedHandle(mojo::MessagePipeHandle(shell_handle)).Pass());
207 loop.Run(); 208 loop.Run();
208 209
209 return MOJO_RESULT_OK; 210 return MOJO_RESULT_OK;
210 } 211 }
OLDNEW
« no previous file with comments | « mojo/apps/js/main.js ('k') | mojo/examples/aura_demo/root_window_host_mojo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698