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

Side by Side Diff: content/browser/renderer_host/render_widget_host_delegate.h

Issue 10383239: Move NativeWebKeyboardEvent to the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 8 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 | Annotate | Revision Log
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 CONTENT_BROWSER_RENDER_WIDGET_HOST_DELEGATE_H_ 5 #ifndef CONTENT_BROWSER_RENDER_WIDGET_HOST_DELEGATE_H_
6 #define CONTENT_BROWSER_RENDER_WIDGET_HOST_DELEGATE_H_ 6 #define CONTENT_BROWSER_RENDER_WIDGET_HOST_DELEGATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 10
11 namespace content {
12
11 struct NativeWebKeyboardEvent; 13 struct NativeWebKeyboardEvent;
12 14
13 namespace content {
14
15 // 15 //
16 // RenderWidgetHostDelegate 16 // RenderWidgetHostDelegate
17 // 17 //
18 // An interface implemented by an object interested in knowing about the state 18 // An interface implemented by an object interested in knowing about the state
19 // of the RenderWidgetHost. 19 // of the RenderWidgetHost.
20 class CONTENT_EXPORT RenderWidgetHostDelegate { 20 class CONTENT_EXPORT RenderWidgetHostDelegate {
21 public: 21 public:
22 // Callback to give the browser a chance to handle the specified keyboard 22 // Callback to give the browser a chance to handle the specified keyboard
23 // event before sending it to the renderer. 23 // event before sending it to the renderer.
24 // Returns true if the |event| was handled. Otherwise, if the |event| would 24 // Returns true if the |event| was handled. Otherwise, if the |event| would
25 // be handled in HandleKeyboardEvent() method as a normal keyboard shortcut, 25 // be handled in HandleKeyboardEvent() method as a normal keyboard shortcut,
26 // |*is_keyboard_shortcut| should be set to true. 26 // |*is_keyboard_shortcut| should be set to true.
27 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, 27 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
28 bool* is_keyboard_shortcut); 28 bool* is_keyboard_shortcut);
29 29
30 // Callback to inform the browser that the renderer did not process the 30 // Callback to inform the browser that the renderer did not process the
31 // specified events. This gives an opportunity to the browser to process the 31 // specified events. This gives an opportunity to the browser to process the
32 // event (used for keyboard shortcuts). 32 // event (used for keyboard shortcuts).
33 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {} 33 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {}
34 34
35 protected: 35 protected:
36 virtual ~RenderWidgetHostDelegate() {} 36 virtual ~RenderWidgetHostDelegate() {}
37 }; 37 };
38 38
39 } // namespace content 39 } // namespace content
40 40
41 #endif // CONTENT_BROWSER_RENDER_WIDGET_HOST_DELEGATE_H_ 41 #endif // CONTENT_BROWSER_RENDER_WIDGET_HOST_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.cc ('k') | content/browser/renderer_host/render_widget_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698