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

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: rebase, fix various issues 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
« no previous file with comments | « mojo/examples/aura_demo/aura_demo.cc ('k') | mojo/examples/aura_demo/root_window_host_mojo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8227754214c1a3fe420391f80e2bc206e4ecc1e0..415618156d322d4f15d3db47ce1b0e79eefc04e1 100644
--- a/mojo/examples/aura_demo/root_window_host_mojo.h
+++ b/mojo/examples/aura_demo/root_window_host_mojo.h
@@ -28,6 +28,7 @@ class WindowTreeHostMojo : public aura::WindowTreeHost,
const base::Callback<void()>& compositor_created_callback);
virtual ~WindowTreeHostMojo();
+ gfx::Rect bounds() const { return bounds_; }
GLES2ClientImpl* gles2_client() { return gles2_client_.get(); }
private:
@@ -55,16 +56,18 @@ class WindowTreeHostMojo : public aura::WindowTreeHost,
virtual void PrepareForShutdown() OVERRIDE;
// Overridden from NativeViewportClient:
- virtual void OnCreated() OVERRIDE;
+ virtual void OnCreated() MOJO_OVERRIDE;
virtual void OnDestroyed() OVERRIDE;
virtual void OnBoundsChanged(const Rect& bounds) OVERRIDE;
virtual void OnEvent(const Event& event) OVERRIDE;
- void DidCreateContext(gfx::Size size);
+ void DidCreateContext();
+ void CreateCompositorIfNeeded();
static ui::ContextFactory* context_factory_;
scoped_ptr<GLES2ClientImpl> gles2_client_;
+ bool context_created_;
RemotePtr<NativeViewport> native_viewport_;
base::Callback<void()> compositor_created_callback_;
« no previous file with comments | « mojo/examples/aura_demo/aura_demo.cc ('k') | mojo/examples/aura_demo/root_window_host_mojo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698