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

Side by Side Diff: chrome/browser/renderer_host/render_view_host_delegate.h

Issue 400012: Refactor the keyboard events handling code related to RenderViewHostDelegate:... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 // |operation| describes the current operation (none, move, copy, link.) 119 // |operation| describes the current operation (none, move, copy, link.)
120 virtual void UpdateDragCursor(WebKit::WebDragOperation operation) = 0; 120 virtual void UpdateDragCursor(WebKit::WebDragOperation operation) = 0;
121 121
122 // Notification that view for this delegate got the focus. 122 // Notification that view for this delegate got the focus.
123 virtual void GotFocus() = 0; 123 virtual void GotFocus() = 0;
124 124
125 // Callback to inform the browser it should take back focus. If reverse is 125 // Callback to inform the browser it should take back focus. If reverse is
126 // true, it means the focus was retrieved by doing a Shift-Tab. 126 // true, it means the focus was retrieved by doing a Shift-Tab.
127 virtual void TakeFocus(bool reverse) = 0; 127 virtual void TakeFocus(bool reverse) = 0;
128 128
129 // Returns whether the event is a reserved keyboard shortcut that should not 129 // Callback to give the browser a chance to handle the specified keyboard
130 // be sent to the renderer. 130 // event before sending it to the renderer.
131 virtual bool IsReservedAccelerator(const NativeWebKeyboardEvent& event) = 0; 131 // Returns true if the |event| was handled. Otherwise, if the |event| would
132 // be handled in HandleKeyboardEvent() method as a normal keyboard shortcut,
133 // |*is_keyboard_shortcut| should be set to true.
134 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
135 bool* is_keyboard_shortcut) = 0;
132 136
133 // Callback to inform the browser that the renderer did not process the 137 // Callback to inform the browser that the renderer did not process the
134 // specified events. This gives an opportunity to the browser to process the 138 // specified events. This gives an opportunity to the browser to process the
135 // event (used for keyboard shortcuts). 139 // event (used for keyboard shortcuts).
136 // Returns true if the event was handled. 140 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) = 0;
137 virtual bool HandleKeyboardEvent(const NativeWebKeyboardEvent& event) = 0;
138 141
139 // Notifications about mouse events in this view. This is useful for 142 // Notifications about mouse events in this view. This is useful for
140 // implementing global 'on hover' features external to the view. 143 // implementing global 'on hover' features external to the view.
141 virtual void HandleMouseEvent() = 0; 144 virtual void HandleMouseEvent() = 0;
142 virtual void HandleMouseLeave() = 0; 145 virtual void HandleMouseLeave() = 0;
143 146
144 // The contents' preferred size changed. 147 // The contents' preferred size changed.
145 virtual void UpdatePreferredSize(const gfx::Size& pref_size) = 0; 148 virtual void UpdatePreferredSize(const gfx::Size& pref_size) = 0;
146 }; 149 };
147 150
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 virtual bool IsExternalTabContainer() const; 567 virtual bool IsExternalTabContainer() const;
565 568
566 // The RenderView has inserted one css file into page. 569 // The RenderView has inserted one css file into page.
567 virtual void DidInsertCSS() {} 570 virtual void DidInsertCSS() {}
568 571
569 // A different node in the page got focused. 572 // A different node in the page got focused.
570 virtual void FocusedNodeChanged() {} 573 virtual void FocusedNodeChanged() {}
571 }; 574 };
572 575
573 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ 576 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_view_host.cc ('k') | chrome/browser/renderer_host/render_widget_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698