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

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

Issue 10377158: Move keyboard related methods from RenderViewHostDelegate to a new RenderWidgetHostDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: now with new files added 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_RENDER_WIDGET_HOST_DELEGATE_H_
6 #define CONTENT_BROWSER_RENDER_WIDGET_HOST_DELEGATE_H_
7 #pragma once
8
9 struct NativeWebKeyboardEvent;
10
11 namespace content {
12
13 //
14 // RenderWidgetHostDelegate
15 //
16 // An interface implemented by an object interested in knowing about the state
17 // of the RenderWidgetHost.
18 class RenderWidgetHostDelegate {
19 public:
20 // Callback to give the browser a chance to handle the specified keyboard
21 // event before sending it to the renderer.
22 // Returns true if the |event| was handled. Otherwise, if the |event| would
23 // be handled in HandleKeyboardEvent() method as a normal keyboard shortcut,
24 // |*is_keyboard_shortcut| should be set to true.
25 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
26 bool* is_keyboard_shortcut);
27
28 // Callback to inform the browser that the renderer did not process the
29 // specified events. This gives an opportunity to the browser to process the
30 // event (used for keyboard shortcuts).
31 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {}
32
33 protected:
34 virtual ~RenderWidgetHostDelegate() {}
35 };
36
37 } // namespace content
38
39 #endif // CONTENT_BROWSER_RENDER_WIDGET_HOST_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698