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

Side by Side Diff: components/native_viewport/native_viewport_application_delegate.h

Issue 1130353008: Ensure that NativeViewport destructs correctly on Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef COMPONENTS_NATIVE_VIEWPORT_NATIVE_VIEWPORT_APPLICATION_DELEGATE_H_ 5 #ifndef COMPONENTS_NATIVE_VIEWPORT_NATIVE_VIEWPORT_APPLICATION_DELEGATE_H_
6 #define COMPONENTS_NATIVE_VIEWPORT_NATIVE_VIEWPORT_APPLICATION_DELEGATE_H_ 6 #define COMPONENTS_NATIVE_VIEWPORT_NATIVE_VIEWPORT_APPLICATION_DELEGATE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "components/gles2/gpu_impl.h" 9 #include "components/gles2/gpu_impl.h"
10 #include "components/native_viewport/public/interfaces/native_viewport.mojom.h" 10 #include "components/native_viewport/public/interfaces/native_viewport.mojom.h"
11 #include "mojo/application/public/cpp/application_delegate.h" 11 #include "mojo/application/public/cpp/application_delegate.h"
12 #include "mojo/application/public/cpp/interface_factory_impl.h" 12 #include "mojo/application/public/cpp/interface_factory_impl.h"
13 #include "mojo/common/tracing_impl.h" 13 #include "mojo/common/tracing_impl.h"
14 14
15 namespace mojo { 15 namespace mojo {
16 class ApplicationConnection; 16 class ApplicationConnection;
17 class ApplicationImpl; 17 class ApplicationImpl;
18 } 18 }
19 19
20 namespace ui {
21 class PlatformEventSource;
22 }
23
20 namespace native_viewport { 24 namespace native_viewport {
21 25
22 class NativeViewportApplicationDelegate 26 class NativeViewportApplicationDelegate
23 : public mojo::ApplicationDelegate, 27 : public mojo::ApplicationDelegate,
24 public mojo::InterfaceFactory<mojo::NativeViewport>, 28 public mojo::InterfaceFactory<mojo::NativeViewport>,
25 public mojo::InterfaceFactory<mojo::Gpu> { 29 public mojo::InterfaceFactory<mojo::Gpu> {
26 public: 30 public:
27 NativeViewportApplicationDelegate(); 31 NativeViewportApplicationDelegate();
28 ~NativeViewportApplicationDelegate() override; 32 ~NativeViewportApplicationDelegate() override;
29 33
30 private: 34 private:
31 // mojo::ApplicationDelegate implementation. 35 // mojo::ApplicationDelegate implementation.
32 void Initialize(mojo::ApplicationImpl* application) override; 36 void Initialize(mojo::ApplicationImpl* application) override;
33 bool ConfigureIncomingConnection( 37 bool ConfigureIncomingConnection(
34 mojo::ApplicationConnection* connection) override; 38 mojo::ApplicationConnection* connection) override;
35 39
36 // mojo::InterfaceFactory<NativeViewport> implementation. 40 // mojo::InterfaceFactory<NativeViewport> implementation.
37 void Create(mojo::ApplicationConnection* connection, 41 void Create(mojo::ApplicationConnection* connection,
38 mojo::InterfaceRequest<mojo::NativeViewport> request) override; 42 mojo::InterfaceRequest<mojo::NativeViewport> request) override;
39 43
40 // mojo::InterfaceFactory<Gpu> implementation. 44 // mojo::InterfaceFactory<Gpu> implementation.
41 void Create(mojo::ApplicationConnection* connection, 45 void Create(mojo::ApplicationConnection* connection,
42 mojo::InterfaceRequest<mojo::Gpu> request) override; 46 mojo::InterfaceRequest<mojo::Gpu> request) override;
43 47
44 scoped_refptr<gles2::GpuState> gpu_state_; 48 scoped_refptr<gles2::GpuState> gpu_state_;
49 scoped_ptr<ui::PlatformEventSource> event_source_;
45 bool is_headless_; 50 bool is_headless_;
46 mojo::TracingImpl tracing_; 51 mojo::TracingImpl tracing_;
47 52
48 DISALLOW_COPY_AND_ASSIGN(NativeViewportApplicationDelegate); 53 DISALLOW_COPY_AND_ASSIGN(NativeViewportApplicationDelegate);
49 }; 54 };
50 55
51 } // namespace native_viewport 56 } // namespace native_viewport
52 57
53 #endif // COMPONENTS_NATIVE_VIEWPORT_NATIVE_VIEWPORT_APPLICATION_DELEGATE_H_ 58 #endif // COMPONENTS_NATIVE_VIEWPORT_NATIVE_VIEWPORT_APPLICATION_DELEGATE_H_
OLDNEW
« no previous file with comments | « components/gles2/command_buffer_driver.cc ('k') | components/native_viewport/native_viewport_application_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698