| 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_RENDERER_RENDER_VIEW_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| 6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "base/timer/timer.h" | 22 #include "base/timer/timer.h" |
| 23 #include "build/build_config.h" | 23 #include "build/build_config.h" |
| 24 #include "cc/input/top_controls_state.h" | 24 #include "cc/input/top_controls_state.h" |
| 25 #include "cc/resources/shared_bitmap.h" | 25 #include "cc/resources/shared_bitmap.h" |
| 26 #include "content/common/content_export.h" | 26 #include "content/common/content_export.h" |
| 27 #include "content/common/drag_event_source_info.h" | 27 #include "content/common/drag_event_source_info.h" |
| 28 #include "content/common/edit_command.h" | 28 #include "content/common/edit_command.h" |
| 29 #include "content/common/frame_message_enums.h" | 29 #include "content/common/frame_message_enums.h" |
| 30 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" | 30 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" |
| 31 #include "content/common/navigation_gesture.h" | 31 #include "content/common/navigation_gesture.h" |
| 32 #include "content/common/navigation_params.h" | |
| 33 #include "content/common/view_message_enums.h" | 32 #include "content/common/view_message_enums.h" |
| 34 #include "content/public/common/page_zoom.h" | 33 #include "content/public/common/page_zoom.h" |
| 35 #include "content/public/common/referrer.h" | 34 #include "content/public/common/referrer.h" |
| 36 #include "content/public/common/renderer_preferences.h" | 35 #include "content/public/common/renderer_preferences.h" |
| 37 #include "content/public/common/stop_find_action.h" | 36 #include "content/public/common/stop_find_action.h" |
| 38 #include "content/public/common/top_controls_state.h" | 37 #include "content/public/common/top_controls_state.h" |
| 39 #include "content/public/common/web_preferences.h" | 38 #include "content/public/common/web_preferences.h" |
| 40 #include "content/public/renderer/render_view.h" | 39 #include "content/public/renderer/render_view.h" |
| 41 #include "content/renderer/mouse_lock_dispatcher.h" | 40 #include "content/renderer/mouse_lock_dispatcher.h" |
| 42 #include "content/renderer/render_frame_impl.h" | 41 #include "content/renderer/render_frame_impl.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 struct WebWindowFeatures; | 113 struct WebWindowFeatures; |
| 115 | 114 |
| 116 #if defined(OS_ANDROID) | 115 #if defined(OS_ANDROID) |
| 117 class WebHitTestResult; | 116 class WebHitTestResult; |
| 118 #endif | 117 #endif |
| 119 } // namespace blink | 118 } // namespace blink |
| 120 | 119 |
| 121 namespace content { | 120 namespace content { |
| 122 | 121 |
| 123 class DevToolsAgent; | 122 class DevToolsAgent; |
| 124 class DocumentState; | |
| 125 class HistoryController; | 123 class HistoryController; |
| 126 class HistoryEntry; | 124 class HistoryEntry; |
| 127 class MouseLockDispatcher; | 125 class MouseLockDispatcher; |
| 128 class NavigationState; | |
| 129 class PageState; | 126 class PageState; |
| 130 class PepperPluginInstanceImpl; | 127 class PepperPluginInstanceImpl; |
| 131 class RenderViewImplTest; | 128 class RenderViewImplTest; |
| 132 class RenderViewObserver; | 129 class RenderViewObserver; |
| 133 class RenderViewTest; | 130 class RenderViewTest; |
| 134 class RendererDateTimePicker; | 131 class RendererDateTimePicker; |
| 135 class RendererWebColorChooserImpl; | 132 class RendererWebColorChooserImpl; |
| 136 class SpeechRecognitionDispatcher; | 133 class SpeechRecognitionDispatcher; |
| 137 class WebPluginDelegateProxy; | 134 class WebPluginDelegateProxy; |
| 138 struct DropData; | 135 struct DropData; |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 CONNECTION_ERROR, | 566 CONNECTION_ERROR, |
| 570 }; | 567 }; |
| 571 | 568 |
| 572 // Old WebFrameClient implementations ---------------------------------------- | 569 // Old WebFrameClient implementations ---------------------------------------- |
| 573 | 570 |
| 574 // RenderViewImpl used to be a WebFrameClient, but now RenderFrameImpl is the | 571 // RenderViewImpl used to be a WebFrameClient, but now RenderFrameImpl is the |
| 575 // WebFrameClient. However, many implementations of WebFrameClient methods | 572 // WebFrameClient. However, many implementations of WebFrameClient methods |
| 576 // still live here and are called from RenderFrameImpl. These implementations | 573 // still live here and are called from RenderFrameImpl. These implementations |
| 577 // are to be moved to RenderFrameImpl <http://crbug.com/361761>. | 574 // are to be moved to RenderFrameImpl <http://crbug.com/361761>. |
| 578 | 575 |
| 579 void didCreateDataSource(blink::WebLocalFrame* frame, | |
| 580 blink::WebDataSource* datasource); | |
| 581 void didChangeIcon(blink::WebLocalFrame*, blink::WebIconURL::Type); | 576 void didChangeIcon(blink::WebLocalFrame*, blink::WebIconURL::Type); |
| 582 void didUpdateCurrentHistoryItem(blink::WebLocalFrame* frame); | 577 void didUpdateCurrentHistoryItem(blink::WebLocalFrame* frame); |
| 583 void didChangeScrollOffset(blink::WebLocalFrame* frame); | 578 void didChangeScrollOffset(blink::WebLocalFrame* frame); |
| 584 | 579 |
| 585 static bool IsReload(FrameMsg_Navigate_Type::Value navigation_type); | |
| 586 | |
| 587 static Referrer GetReferrerFromRequest( | 580 static Referrer GetReferrerFromRequest( |
| 588 blink::WebFrame* frame, | 581 blink::WebFrame* frame, |
| 589 const blink::WebURLRequest& request); | 582 const blink::WebURLRequest& request); |
| 590 | 583 |
| 591 static WindowOpenDisposition NavigationPolicyToDisposition( | 584 static WindowOpenDisposition NavigationPolicyToDisposition( |
| 592 blink::WebNavigationPolicy policy); | 585 blink::WebNavigationPolicy policy); |
| 593 | 586 |
| 594 void UpdateSessionHistory(blink::WebFrame* frame); | 587 void UpdateSessionHistory(blink::WebFrame* frame); |
| 595 void SendUpdateState(HistoryEntry* entry); | 588 void SendUpdateState(HistoryEntry* entry); |
| 596 | 589 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 702 // Check whether the preferred size has changed. | 695 // Check whether the preferred size has changed. |
| 703 void CheckPreferredSize(); | 696 void CheckPreferredSize(); |
| 704 | 697 |
| 705 // Gets the currently focused element, if any. | 698 // Gets the currently focused element, if any. |
| 706 blink::WebElement GetFocusedElement() const; | 699 blink::WebElement GetFocusedElement() const; |
| 707 | 700 |
| 708 // Called to get the WebPlugin to handle find requests in the document. | 701 // Called to get the WebPlugin to handle find requests in the document. |
| 709 // Returns NULL if there is no such WebPlugin. | 702 // Returns NULL if there is no such WebPlugin. |
| 710 blink::WebPlugin* GetWebPluginForFind(); | 703 blink::WebPlugin* GetWebPluginForFind(); |
| 711 | 704 |
| 712 // If we initiated a navigation, this function will populate |document_state| | |
| 713 // with the navigation information saved in OnNavigate(). | |
| 714 void PopulateDocumentStateFromPending(DocumentState* document_state); | |
| 715 | |
| 716 // Returns a new NavigationState populated with the navigation information | |
| 717 // saved in OnNavigate(). | |
| 718 NavigationState* CreateNavigationStateFromPending(); | |
| 719 | |
| 720 #if defined(OS_ANDROID) | 705 #if defined(OS_ANDROID) |
| 721 // Launch an Android content intent with the given URL. | 706 // Launch an Android content intent with the given URL. |
| 722 void LaunchAndroidContentIntent(const GURL& intent_url, size_t request_id); | 707 void LaunchAndroidContentIntent(const GURL& intent_url, size_t request_id); |
| 723 #endif | 708 #endif |
| 724 | 709 |
| 725 // Sends a reply to the current find operation handling if it was a | 710 // Sends a reply to the current find operation handling if it was a |
| 726 // synchronous find request. | 711 // synchronous find request. |
| 727 void SendFindReply(int request_id, | 712 void SendFindReply(int request_id, |
| 728 int match_count, | 713 int match_count, |
| 729 int ordinal, | 714 int ordinal, |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 // Whether this RenderView was created by a frame that was suppressing its | 808 // Whether this RenderView was created by a frame that was suppressing its |
| 824 // opener. If so, we may want to load pages in a separate process. See | 809 // opener. If so, we may want to load pages in a separate process. See |
| 825 // decidePolicyForNavigation for details. | 810 // decidePolicyForNavigation for details. |
| 826 bool opener_suppressed_; | 811 bool opener_suppressed_; |
| 827 | 812 |
| 828 // Whether we must stop creating nested message loops for modal dialogs until | 813 // Whether we must stop creating nested message loops for modal dialogs until |
| 829 // OnSwapOut is called. This is necessary because modal dialogs have a | 814 // OnSwapOut is called. This is necessary because modal dialogs have a |
| 830 // PageGroupLoadDeferrer on the stack that interferes with swapping out. | 815 // PageGroupLoadDeferrer on the stack that interferes with swapping out. |
| 831 bool suppress_dialogs_until_swap_out_; | 816 bool suppress_dialogs_until_swap_out_; |
| 832 | 817 |
| 833 // Holds state pertaining to a navigation that we initiated. This is held by | |
| 834 // the WebDataSource::ExtraData attribute. We use pending_navigation_params_ | |
| 835 // as a temporary holder for the state until the WebDataSource corresponding | |
| 836 // to the new navigation is created. See DidCreateDataSource. | |
| 837 // TODO(nasko): Move to RenderFrame, as this is per-frame state. | |
| 838 scoped_ptr<NavigationParams> pending_navigation_params_; | |
| 839 | |
| 840 // Timer used to delay the updating of nav state (see SyncNavigationState). | 818 // Timer used to delay the updating of nav state (see SyncNavigationState). |
| 841 base::OneShotTimer<RenderViewImpl> nav_state_sync_timer_; | 819 base::OneShotTimer<RenderViewImpl> nav_state_sync_timer_; |
| 842 | 820 |
| 843 // Page IDs ------------------------------------------------------------------ | 821 // Page IDs ------------------------------------------------------------------ |
| 844 // See documentation in RenderView. | 822 // See documentation in RenderView. |
| 845 int32 page_id_; | 823 int32 page_id_; |
| 846 | 824 |
| 847 // The next available page ID to use for this RenderView. These IDs are | 825 // The next available page ID to use for this RenderView. These IDs are |
| 848 // specific to a given RenderView and the frames within it. | 826 // specific to a given RenderView and the frames within it. |
| 849 int32 next_page_id_; | 827 int32 next_page_id_; |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1036 // use the Observer interface to filter IPC messages and receive frame change | 1014 // use the Observer interface to filter IPC messages and receive frame change |
| 1037 // notifications. | 1015 // notifications. |
| 1038 // --------------------------------------------------------------------------- | 1016 // --------------------------------------------------------------------------- |
| 1039 | 1017 |
| 1040 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 1018 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
| 1041 }; | 1019 }; |
| 1042 | 1020 |
| 1043 } // namespace content | 1021 } // namespace content |
| 1044 | 1022 |
| 1045 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 1023 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| OLD | NEW |