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

Side by Side Diff: chrome/browser/extensions/extension_input_api.h

Issue 6823055: Consolidate OnKeyEvent and InputMethod code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nix RootView from extension_input_api, revert mouse and touch event changes. Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_input_api.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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CHROME_BROWSER_EXTENSIONS_EXTENSION_INPUT_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_INPUT_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INPUT_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INPUT_API_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/extensions/extension_function.h" 9 #include "chrome/browser/extensions/extension_function.h"
10 10
11 namespace views { 11 namespace views {
12 class RootView; 12 class Widget;
Ben Goodger (Google) 2011/04/22 20:23:45 nit: outdent 2 spaces
msw 2011/04/22 21:34:38 Done.
13 } // namespace views 13 } // namespace views
14 14
15 // Base class for input APIs. 15 // Base class for input APIs.
16 class InputFunction : public AsyncExtensionFunction { 16 class InputFunction : public AsyncExtensionFunction {
17 public: 17 public:
18 virtual void Run(); 18 virtual void Run();
19 virtual bool RunImpl() = 0; 19 virtual bool RunImpl() = 0;
20 }; 20 };
21 21
22 // Note that this experimental API is currently only available for 22 // Note that this experimental API is currently only available for
23 // TOOLKIT_VIEWS (see chrome/chrome_browser.gypi). 23 // TOOLKIT_VIEWS (see chrome/chrome_browser.gypi).
24 // 24 //
25 // We may eventually support other platforms by adding the necessary 25 // We may eventually support other platforms by adding the necessary
26 // synthetic event distribution code to this Function. 26 // synthetic event distribution code to this Function.
27 class SendKeyboardEventInputFunction : public InputFunction { 27 class SendKeyboardEventInputFunction : public InputFunction {
28 public: 28 public:
29 virtual bool RunImpl(); 29 virtual bool RunImpl();
30 DECLARE_EXTENSION_FUNCTION_NAME("experimental.input.sendKeyboardEvent"); 30 DECLARE_EXTENSION_FUNCTION_NAME("experimental.input.sendKeyboardEvent");
31 31
32 private: 32 private:
33 views::RootView* GetRootView(); 33 views::Widget* GetTopLevelWidget();
34 }; 34 };
35 35
36 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INPUT_API_H_ 36 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INPUT_API_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_input_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698