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

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: remove crbug link 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 #include "content/common/content_export.h"
10
11 struct NativeWebKeyboardEvent;
12
13 namespace content {
14
15 //
16 // RenderWidgetHostDelegate
17 //
18 // An interface implemented by an object interested in knowing about the state
19 // of the RenderWidgetHost.
20 class CONTENT_EXPORT RenderWidgetHostDelegate {
21 public:
22 // Callback to give the browser a chance to handle the specified keyboard
23 // event before sending it to the renderer.
24 // Returns true if the |event| was handled. Otherwise, if the |event| would
25 // be handled in HandleKeyboardEvent() method as a normal keyboard shortcut,
26 // |*is_keyboard_shortcut| should be set to true.
27 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
28 bool* is_keyboard_shortcut);
29
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
32 // event (used for keyboard shortcuts).
33 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {}
34
35 protected:
36 virtual ~RenderWidgetHostDelegate() {}
37 };
38
39 } // namespace content
40
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_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698