| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
| 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 | 535 |
| 536 bool is_waiting_for_unload_ack() { return is_waiting_for_unload_ack_; } | 536 bool is_waiting_for_unload_ack() { return is_waiting_for_unload_ack_; } |
| 537 #endif | 537 #endif |
| 538 | 538 |
| 539 // Checks that the given renderer can request |url|, if not it sets it to an | 539 // Checks that the given renderer can request |url|, if not it sets it to an |
| 540 // empty url. | 540 // empty url. |
| 541 static void FilterURL(ChildProcessSecurityPolicy* policy, | 541 static void FilterURL(ChildProcessSecurityPolicy* policy, |
| 542 int renderer_id, | 542 int renderer_id, |
| 543 GURL* url); | 543 GURL* url); |
| 544 | 544 |
| 545 const gfx::Size& last_scroll_offset() const { return last_scroll_offset_; } |
| 546 |
| 545 protected: | 547 protected: |
| 546 // RenderWidgetHost protected overrides. | 548 // RenderWidgetHost protected overrides. |
| 547 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, | 549 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |
| 548 bool* is_keyboard_shortcut); | 550 bool* is_keyboard_shortcut); |
| 549 virtual void UnhandledKeyboardEvent(const NativeWebKeyboardEvent& event); | 551 virtual void UnhandledKeyboardEvent(const NativeWebKeyboardEvent& event); |
| 550 virtual void OnUserGesture(); | 552 virtual void OnUserGesture(); |
| 551 virtual void NotifyRendererUnresponsive(); | 553 virtual void NotifyRendererUnresponsive(); |
| 552 virtual void NotifyRendererResponsive(); | 554 virtual void NotifyRendererResponsive(); |
| 553 virtual void OnMsgFocusedNodeChanged(bool is_editable_node); | 555 virtual void OnMsgFocusedNodeChanged(bool is_editable_node); |
| 554 virtual void OnMsgFocus(); | 556 virtual void OnMsgFocus(); |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 int maximum_percent, | 698 int maximum_percent, |
| 697 bool remember); | 699 bool remember); |
| 698 void OnSetSuggestions(int32 page_id, | 700 void OnSetSuggestions(int32 page_id, |
| 699 const std::vector<std::string>& suggestions); | 701 const std::vector<std::string>& suggestions); |
| 700 void OnInstantSupportDetermined(int32 page_id, bool result); | 702 void OnInstantSupportDetermined(int32 page_id, bool result); |
| 701 void OnDetectedPhishingSite(const GURL& phishing_url, double phishing_score); | 703 void OnDetectedPhishingSite(const GURL& phishing_url, double phishing_score); |
| 702 void OnScriptEvalResponse(int id, const ListValue& result); | 704 void OnScriptEvalResponse(int id, const ListValue& result); |
| 703 void OnUpdateContentRestrictions(int restrictions); | 705 void OnUpdateContentRestrictions(int restrictions); |
| 704 void OnPagesReadyForPreview( | 706 void OnPagesReadyForPreview( |
| 705 const ViewHostMsg_DidPreviewDocument_Params& params); | 707 const ViewHostMsg_DidPreviewDocument_Params& params); |
| 708 void OnUpdateScrollOffset(const gfx::Size& size); |
| 706 | 709 |
| 707 #if defined(OS_MACOSX) | 710 #if defined(OS_MACOSX) |
| 708 void OnMsgShowPopup(const ViewHostMsg_ShowPopup_Params& params); | 711 void OnMsgShowPopup(const ViewHostMsg_ShowPopup_Params& params); |
| 709 #endif | 712 #endif |
| 710 | 713 |
| 711 private: | 714 private: |
| 712 friend class TestRenderViewHost; | 715 friend class TestRenderViewHost; |
| 713 | 716 |
| 714 // Get/Create print preview tab. | 717 // Get/Create print preview tab. |
| 715 TabContents* GetOrCreatePrintPreviewTab(); | 718 TabContents* GetOrCreatePrintPreviewTab(); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 | 787 |
| 785 // Whether the accessibility tree should be saved, for unit testing. | 788 // Whether the accessibility tree should be saved, for unit testing. |
| 786 bool save_accessibility_tree_for_testing_; | 789 bool save_accessibility_tree_for_testing_; |
| 787 | 790 |
| 788 // The most recently received accessibility tree - for unit testing only. | 791 // The most recently received accessibility tree - for unit testing only. |
| 789 webkit_glue::WebAccessibility accessibility_tree_; | 792 webkit_glue::WebAccessibility accessibility_tree_; |
| 790 | 793 |
| 791 // The termination status of the last render view that terminated. | 794 // The termination status of the last render view that terminated. |
| 792 base::TerminationStatus render_view_termination_status_; | 795 base::TerminationStatus render_view_termination_status_; |
| 793 | 796 |
| 797 // The last scroll offset of the render view. |
| 798 gfx::Size last_scroll_offset_; |
| 799 |
| 794 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); | 800 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); |
| 795 }; | 801 }; |
| 796 | 802 |
| 797 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 803 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
| OLD | NEW |