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

Side by Side Diff: remoting/host/basic_desktop_environment.h

Issue 1033913003: Touch Events capability negotiation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: back to setting a flag on DesktopEnvironmentFactory Created 5 years, 8 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 REMOTING_HOST_BASIC_DESKTOP_ENVIRONMENT_H_ 5 #ifndef REMOTING_HOST_BASIC_DESKTOP_ENVIRONMENT_H_
6 #define REMOTING_HOST_BASIC_DESKTOP_ENVIRONMENT_H_ 6 #define REMOTING_HOST_BASIC_DESKTOP_ENVIRONMENT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 22 matching lines...) Expand all
33 scoped_ptr<AudioCapturer> CreateAudioCapturer() override; 33 scoped_ptr<AudioCapturer> CreateAudioCapturer() override;
34 scoped_ptr<InputInjector> CreateInputInjector() override; 34 scoped_ptr<InputInjector> CreateInputInjector() override;
35 scoped_ptr<ScreenControls> CreateScreenControls() override; 35 scoped_ptr<ScreenControls> CreateScreenControls() override;
36 scoped_ptr<webrtc::DesktopCapturer> CreateVideoCapturer() override; 36 scoped_ptr<webrtc::DesktopCapturer> CreateVideoCapturer() override;
37 scoped_ptr<webrtc::MouseCursorMonitor> CreateMouseCursorMonitor() override; 37 scoped_ptr<webrtc::MouseCursorMonitor> CreateMouseCursorMonitor() override;
38 std::string GetCapabilities() const override; 38 std::string GetCapabilities() const override;
39 void SetCapabilities(const std::string& capabilities) override; 39 void SetCapabilities(const std::string& capabilities) override;
40 scoped_ptr<GnubbyAuthHandler> CreateGnubbyAuthHandler( 40 scoped_ptr<GnubbyAuthHandler> CreateGnubbyAuthHandler(
41 protocol::ClientStub* client_stub) override; 41 protocol::ClientStub* client_stub) override;
42 42
43 // Enable or disables multi-touch capability.
44 void SetEnableMultiTouch(bool enable);
Wez 2015/04/21 02:12:12 Why is this called multi-touch here and touch-even
Rintaro Kuroiwa 2015/04/22 19:55:59 Since I'm changing the capabilities string to rawT
45
43 protected: 46 protected:
44 friend class BasicDesktopEnvironmentFactory; 47 friend class BasicDesktopEnvironmentFactory;
45 48
46 BasicDesktopEnvironment( 49 BasicDesktopEnvironment(
47 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, 50 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
48 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, 51 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
49 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); 52 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner);
50 53
51 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner() const { 54 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner() const {
52 return caller_task_runner_; 55 return caller_task_runner_;
53 } 56 }
54 57
55 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner() const { 58 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner() const {
56 return input_task_runner_; 59 return input_task_runner_;
57 } 60 }
58 61
59 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner() const { 62 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner() const {
60 return ui_task_runner_; 63 return ui_task_runner_;
61 } 64 }
62 65
63 webrtc::DesktopCaptureOptions* desktop_capture_options() { 66 webrtc::DesktopCaptureOptions* desktop_capture_options() {
64 return desktop_capture_options_.get(); 67 return desktop_capture_options_.get();
65 } 68 }
66 69
70 bool multi_touch_enabled() const { return multi_touch_enabled_; }
71
67 private: 72 private:
68 // Task runner on which methods of DesktopEnvironment interface should be 73 // Task runner on which methods of DesktopEnvironment interface should be
69 // called. 74 // called.
70 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner_; 75 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner_;
71 76
72 // Used to run input-related tasks. 77 // Used to run input-related tasks.
73 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner_; 78 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner_;
74 79
75 // Used to run UI code. 80 // Used to run UI code.
76 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; 81 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_;
77 82
78 // Options shared between |DesktopCapturer| and |MouseCursorMonitor|. It 83 // Options shared between |DesktopCapturer| and |MouseCursorMonitor|. It
79 // might contain expensive resources, thus justifying the sharing. 84 // might contain expensive resources, thus justifying the sharing.
80 // Also: it's dynamically allocated to avoid having to bring in 85 // Also: it's dynamically allocated to avoid having to bring in
81 // desktop_capture_options.h which brings in X11 headers which causes hard to 86 // desktop_capture_options.h which brings in X11 headers which causes hard to
82 // find build errors. 87 // find build errors.
83 scoped_ptr<webrtc::DesktopCaptureOptions> desktop_capture_options_; 88 scoped_ptr<webrtc::DesktopCaptureOptions> desktop_capture_options_;
84 89
90 bool multi_touch_enabled_;
91
85 DISALLOW_COPY_AND_ASSIGN(BasicDesktopEnvironment); 92 DISALLOW_COPY_AND_ASSIGN(BasicDesktopEnvironment);
86 }; 93 };
87 94
88 // Used to create |BasicDesktopEnvironment| instances. 95 // Used to create |BasicDesktopEnvironment| instances.
89 class BasicDesktopEnvironmentFactory : public DesktopEnvironmentFactory { 96 class BasicDesktopEnvironmentFactory : public DesktopEnvironmentFactory {
90 public: 97 public:
91 BasicDesktopEnvironmentFactory( 98 BasicDesktopEnvironmentFactory(
92 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, 99 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
93 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, 100 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
94 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); 101 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner);
95 ~BasicDesktopEnvironmentFactory() override; 102 ~BasicDesktopEnvironmentFactory() override;
96 103
97 // DesktopEnvironmentFactory implementation. 104 // DesktopEnvironmentFactory implementation.
98 bool SupportsAudioCapture() const override; 105 bool SupportsAudioCapture() const override;
106 void SetEnableMultiTouch(bool enable) override;
99 107
100 protected: 108 protected:
101 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner() const { 109 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner() const {
102 return caller_task_runner_; 110 return caller_task_runner_;
103 } 111 }
104 112
105 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner() const { 113 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner() const {
106 return input_task_runner_; 114 return input_task_runner_;
107 } 115 }
108 116
109 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner() const { 117 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner() const {
110 return ui_task_runner_; 118 return ui_task_runner_;
111 } 119 }
112 120
121 bool multi_touch_enabled() const { return multi_touch_enabled_; }
122
113 private: 123 private:
114 // Task runner on which methods of DesktopEnvironmentFactory interface should 124 // Task runner on which methods of DesktopEnvironmentFactory interface should
115 // be called. 125 // be called.
116 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner_; 126 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner_;
117 127
118 // Used to run input-related tasks. 128 // Used to run input-related tasks.
119 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner_; 129 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner_;
120 130
121 // Used to run UI code. 131 // Used to run UI code.
122 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; 132 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_;
123 133
134 bool multi_touch_enabled_;
135
124 DISALLOW_COPY_AND_ASSIGN(BasicDesktopEnvironmentFactory); 136 DISALLOW_COPY_AND_ASSIGN(BasicDesktopEnvironmentFactory);
125 }; 137 };
126 138
127 } // namespace remoting 139 } // namespace remoting
128 140
129 #endif // REMOTING_HOST_BASIC_DESKTOP_ENVIRONMENT_H_ 141 #endif // REMOTING_HOST_BASIC_DESKTOP_ENVIRONMENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698