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

Side by Side Diff: mojo/services/native_viewport/native_viewport_x11.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/services/native_viewport/native_viewport_service.cc ('k') | no next file » | 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 "mojo/services/native_viewport/native_viewport.h" 5 #include "mojo/services/native_viewport/native_viewport.h"
6 6
7 #include <X11/Xlib.h> 7 #include <X11/Xlib.h>
8 8
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/message_loop/message_pump_x11.h" 10 #include "base/message_loop/message_pump_x11.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 0, // border width 43 0, // border width
44 CopyFromParent, // depth 44 CopyFromParent, // depth
45 InputOutput, 45 InputOutput,
46 CopyFromParent, // visual 46 CopyFromParent, // visual
47 CWBackPixmap | CWOverrideRedirect, &swa); 47 CWBackPixmap | CWOverrideRedirect, &swa);
48 48
49 base::MessagePumpX11::Current()->AddDispatcherForWindow(this, window_); 49 base::MessagePumpX11::Current()->AddDispatcherForWindow(this, window_);
50 base::MessagePumpX11::Current()->AddDispatcherForRootWindow(this); 50 base::MessagePumpX11::Current()->AddDispatcherForRootWindow(this);
51 51
52 delegate_->OnAcceleratedWidgetAvailable(window_); 52 delegate_->OnAcceleratedWidgetAvailable(window_);
53 delegate_->OnBoundsChanged(bounds_);
53 } 54 }
54 55
55 virtual void Show() OVERRIDE { 56 virtual void Show() OVERRIDE {
56 XDisplay* display = gfx::GetXDisplay(); 57 XDisplay* display = gfx::GetXDisplay();
57 XMapWindow(display, window_); 58 XMapWindow(display, window_);
58 XFlush(display); 59 XFlush(display);
59 } 60 }
60 61
61 virtual void Close() OVERRIDE { 62 virtual void Close() OVERRIDE {
62 // TODO(beng): perform this in response to XWindow destruction. 63 // TODO(beng): perform this in response to XWindow destruction.
(...skipping 30 matching lines...) Expand all
93 94
94 // static 95 // static
95 scoped_ptr<NativeViewport> NativeViewport::Create( 96 scoped_ptr<NativeViewport> NativeViewport::Create(
96 shell::Context* context, 97 shell::Context* context,
97 NativeViewportDelegate* delegate) { 98 NativeViewportDelegate* delegate) {
98 return scoped_ptr<NativeViewport>(new NativeViewportX11(delegate)).Pass(); 99 return scoped_ptr<NativeViewport>(new NativeViewportX11(delegate)).Pass();
99 } 100 }
100 101
101 } // namespace services 102 } // namespace services
102 } // namespace mojo 103 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/native_viewport/native_viewport_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698