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

Side by Side Diff: mojo/services/native_viewport/native_viewport_win.cc

Issue 120503003: run aura_demo as a mojo app (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « mojo/mojo_examples.gypi ('k') | mojo/services/native_viewport/native_viewport_x11.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 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 "ui/events/event.h" 7 #include "ui/events/event.h"
8 #include "ui/gfx/win/window_impl.h" 8 #include "ui/gfx/win/window_impl.h"
9 9
10 namespace mojo { 10 namespace mojo {
(...skipping 12 matching lines...) Expand all
23 23
24 private: 24 private:
25 // Overridden from NativeViewport: 25 // Overridden from NativeViewport:
26 virtual gfx::Size GetSize() OVERRIDE { 26 virtual gfx::Size GetSize() OVERRIDE {
27 RECT cr; 27 RECT cr;
28 GetClientRect(hwnd(), &cr); 28 GetClientRect(hwnd(), &cr);
29 return gfx::Size(cr.right - cr.left, cr.bottom - cr.top); 29 return gfx::Size(cr.right - cr.left, cr.bottom - cr.top);
30 } 30 }
31 31
32 virtual void Init() OVERRIDE { 32 virtual void Init() OVERRIDE {
33 gfx::WindowImpl::Init(NULL, gfx::Rect(10, 10, 500, 500)); 33 gfx::WindowImpl::Init(NULL, gfx::Rect(10, 10, 800, 600));
34 ShowWindow(hwnd(), SW_SHOWNORMAL); 34 ShowWindow(hwnd(), SW_SHOWNORMAL);
35 SetWindowText(hwnd(), L"native_viewport::NativeViewportWin!"); 35 SetWindowText(hwnd(), L"native_viewport::NativeViewportWin!");
36 } 36 }
37 37
38 virtual void Close() OVERRIDE { 38 virtual void Close() OVERRIDE {
39 DestroyWindow(hwnd()); 39 DestroyWindow(hwnd());
40 } 40 }
41 41
42 virtual void SetCapture() OVERRIDE { 42 virtual void SetCapture() OVERRIDE {
43 DCHECK(::GetCapture() != hwnd()); 43 DCHECK(::GetCapture() != hwnd());
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 // static 98 // static
99 scoped_ptr<NativeViewport> NativeViewport::Create( 99 scoped_ptr<NativeViewport> NativeViewport::Create(
100 shell::Context* context, 100 shell::Context* context,
101 NativeViewportDelegate* delegate) { 101 NativeViewportDelegate* delegate) {
102 return scoped_ptr<NativeViewport>(new NativeViewportWin(delegate)).Pass(); 102 return scoped_ptr<NativeViewport>(new NativeViewportWin(delegate)).Pass();
103 } 103 }
104 104
105 } // namespace services 105 } // namespace services
106 } // namespace mojo 106 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/mojo_examples.gypi ('k') | mojo/services/native_viewport/native_viewport_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698