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

Side by Side Diff: content/browser/gamepad/gamepad_platform_data_fetcher_android.h

Issue 133943002: Gamepad API support for chrome on android (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
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
OLDNEW
(Empty)
1 /*
2 * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of NVIDIA CORPORATION nor the names of its
13 * contributors may be used to endorse or promote products derived
14 * from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
24 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29 // Define the data fetcher that GamepadProvider will use for android port.
30 // (GamepadPlatformDataFetcher).
31
32 #ifndef CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_ANDROID_H_
33 #define CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_ANDROID_H_
34
35 #include "content/browser/android/gamepad_reader_impl.h"
36 #include "content/browser/gamepad/gamepad_data_fetcher.h"
37 #include "content/browser/gamepad/gamepad_provider.h"
38
39 #include "third_party/WebKit/public/platform/WebGamepads.h"
40
41 #if defined(OS_ANDROID)
42
43 namespace content {
44 using blink::WebGamepad;
45 using blink::WebGamepads;
46
47 class GamepadPlatformDataFetcherAndroid : public GamepadDataFetcher {
48 public:
49 GamepadPlatformDataFetcherAndroid();
50 ~GamepadPlatformDataFetcherAndroid();
51
52 // Method for sending pause hints to the JNI interface. Runs on
53 // polling_thread_.
xwang 2014/01/14 03:03:22 Where the method is called?
SaurabhK 2014/01/15 16:57:08 It is called from GamepadProvider::SendPauseHint()
54 virtual void PauseHint(bool ispaused);
xwang 2014/01/16 02:36:42 Well, it should be "virtual void PauseHint(bool is
SaurabhK 2014/01/28 13:23:09 Updated it in latest patchset.
55
56 virtual void GetGamepadData(blink::WebGamepads* pads,
57 bool devices_changed_hint) OVERRIDE;
58 };
59 } // namespace content
60
61 #endif
62 #endif // CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_LINUX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698