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