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

Unified Diff: mojo/examples/aura_demo/root_window_host_mojo.h

Issue 131153007: Send size to NativeViewportClient::OnCreated instead of GLES2Client::DidCreateContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix TODO Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: mojo/examples/aura_demo/root_window_host_mojo.h
diff --git a/mojo/examples/aura_demo/root_window_host_mojo.h b/mojo/examples/aura_demo/root_window_host_mojo.h
index 3e35988935d8120a0c621c8d6bf82bc84d7924b0..3a0682ea8c2f91f0f55bcededfdd71aba8cdfe4a 100644
--- a/mojo/examples/aura_demo/root_window_host_mojo.h
+++ b/mojo/examples/aura_demo/root_window_host_mojo.h
@@ -9,6 +9,7 @@
#include "mojo/public/bindings/lib/remote_ptr.h"
#include "mojom/native_viewport.h"
#include "ui/aura/window_tree_host.h"
+#include "ui/gfx/size.h"
namespace ui {
class ContextFactory;
@@ -53,15 +54,18 @@ class WindowTreeHostMojo : public aura::WindowTreeHost,
virtual void PrepareForShutdown() OVERRIDE;
// Overridden from NativeViewportClient:
- virtual void OnCreated() OVERRIDE;
+ virtual void OnCreated(uint32_t width, uint32_t height) MOJO_OVERRIDE;
virtual void OnDestroyed() OVERRIDE;
virtual void OnEvent(const Event& event) OVERRIDE;
- void DidCreateContext(gfx::Size size);
+ void DidCreateContext();
+ void MaybeCreateCompositor();
static ui::ContextFactory* context_factory_;
+ gfx::Size viewport_size_;
scoped_ptr<GLES2ClientImpl> gles2_client_;
+ bool context_created_;
RemotePtr<NativeViewport> native_viewport_;
base::Callback<void()> compositor_created_callback_;

Powered by Google App Engine
This is Rietveld 408576698