| OLD | NEW |
| 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_PUBLIC_BROWSER_RENDER_VIEW_HOST_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_DELEGATE_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_DELEGATE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 virtual void WorkerCrashed() {} | 390 virtual void WorkerCrashed() {} |
| 391 | 391 |
| 392 // The page wants the hosting window to activate/deactivate itself (it | 392 // The page wants the hosting window to activate/deactivate itself (it |
| 393 // called the JavaScript window.focus()/blur() method). | 393 // called the JavaScript window.focus()/blur() method). |
| 394 virtual void Activate() {} | 394 virtual void Activate() {} |
| 395 virtual void Deactivate() {} | 395 virtual void Deactivate() {} |
| 396 | 396 |
| 397 // Notification that the view has lost capture. | 397 // Notification that the view has lost capture. |
| 398 virtual void LostCapture() {} | 398 virtual void LostCapture() {} |
| 399 | 399 |
| 400 // Callback to give the browser a chance to handle the specified keyboard | |
| 401 // event before sending it to the renderer. | |
| 402 // Returns true if the |event| was handled. Otherwise, if the |event| would | |
| 403 // be handled in HandleKeyboardEvent() method as a normal keyboard shortcut, | |
| 404 // |*is_keyboard_shortcut| should be set to true. | |
| 405 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, | |
| 406 bool* is_keyboard_shortcut); | |
| 407 | |
| 408 // Callback to inform the browser that the renderer did not process the | |
| 409 // specified events. This gives an opportunity to the browser to process the | |
| 410 // event (used for keyboard shortcuts). | |
| 411 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {} | |
| 412 | |
| 413 // Notifications about mouse events in this view. This is useful for | 400 // Notifications about mouse events in this view. This is useful for |
| 414 // implementing global 'on hover' features external to the view. | 401 // implementing global 'on hover' features external to the view. |
| 415 virtual void HandleMouseMove() {} | 402 virtual void HandleMouseMove() {} |
| 416 virtual void HandleMouseDown() {} | 403 virtual void HandleMouseDown() {} |
| 417 virtual void HandleMouseLeave() {} | 404 virtual void HandleMouseLeave() {} |
| 418 virtual void HandleMouseUp() {} | 405 virtual void HandleMouseUp() {} |
| 419 virtual void HandleMouseActivate() {} | 406 virtual void HandleMouseActivate() {} |
| 420 | 407 |
| 421 // Called when a file selection is to be done. | 408 // Called when a file selection is to be done. |
| 422 virtual void RunFileChooser( | 409 virtual void RunFileChooser( |
| (...skipping 18 matching lines...) Expand all Loading... |
| 441 // Notification that the view has lost the mouse lock. | 428 // Notification that the view has lost the mouse lock. |
| 442 virtual void LostMouseLock() {} | 429 virtual void LostMouseLock() {} |
| 443 | 430 |
| 444 protected: | 431 protected: |
| 445 virtual ~RenderViewHostDelegate() {} | 432 virtual ~RenderViewHostDelegate() {} |
| 446 }; | 433 }; |
| 447 | 434 |
| 448 } // namespace content | 435 } // namespace content |
| 449 | 436 |
| 450 #endif // CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_DELEGATE_H_ | 437 #endif // CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_DELEGATE_H_ |
| OLD | NEW |