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

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

Issue 65883002: mojo_shell crashes on Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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
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 // Stub to build on platforms we don't fully support yet. 7 // Stub to build on platforms we don't fully support yet.
8 8
9 namespace mojo { 9 namespace mojo {
10 namespace services { 10 namespace services {
11 11
12 class NativeViewportStub : public NativeViewport { 12 class NativeViewportStub : public NativeViewport {
13 public: 13 public:
14 NativeViewportStub(NativeViewportDelegate* delegate) 14 NativeViewportStub(NativeViewportDelegate* delegate)
15 : delegate_(delegate) { 15 : delegate_(delegate) {
16 } 16 }
17 virtual ~NativeViewportStub() { 17 virtual ~NativeViewportStub() {
18 } 18 }
19 19
20 private: 20 private:
21 // Overridden from NativeViewport: 21 // Overridden from NativeViewport:
22 virtual gfx::Size GetSize() OVERRIDE { 22 virtual gfx::Size GetSize() OVERRIDE {
23 return gfx::Size(); 23 return gfx::Size();
24 } 24 }
25 virtual void Open() OVERRIDE {
26 }
25 virtual void Close() OVERRIDE { 27 virtual void Close() OVERRIDE {
26 delegate_->OnDestroyed(); 28 delegate_->OnDestroyed();
27 } 29 }
28 30
29 NativeViewportDelegate* delegate_; 31 NativeViewportDelegate* delegate_;
30 32
31 DISALLOW_COPY_AND_ASSIGN(NativeViewportStub); 33 DISALLOW_COPY_AND_ASSIGN(NativeViewportStub);
32 }; 34 };
33 35
34 // static 36 // static
35 scoped_ptr<NativeViewport> NativeViewport::Create( 37 scoped_ptr<NativeViewport> NativeViewport::Create(
36 shell::Context* context, 38 shell::Context* context,
37 NativeViewportDelegate* delegate) { 39 NativeViewportDelegate* delegate) {
38 return scoped_ptr<NativeViewport>(new NativeViewportStub(delegate)).Pass(); 40 return scoped_ptr<NativeViewport>(new NativeViewportStub(delegate)).Pass();
39 } 41 }
40 42
41 } // namespace services 43 } // namespace services
42 } // namespace mojo 44 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698