| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <deque> | 9 #include <deque> |
| 10 #include <map> | 10 #include <map> |
| 11 #include <queue> | 11 #include <queue> |
| 12 #include <set> | 12 #include <set> |
| 13 #include <string> | 13 #include <string> |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "base/basictypes.h" | 16 #include "base/basictypes.h" |
| 17 #include "base/gtest_prod_util.h" | 17 #include "base/gtest_prod_util.h" |
| 18 #include "base/id_map.h" | 18 #include "base/id_map.h" |
| 19 #include "base/memory/linked_ptr.h" | 19 #include "base/memory/linked_ptr.h" |
| 20 #include "base/memory/weak_ptr.h" | 20 #include "base/memory/weak_ptr.h" |
| 21 #include "base/observer_list.h" | 21 #include "base/observer_list.h" |
| 22 #include "base/timer.h" | 22 #include "base/timer.h" |
| 23 #include "build/build_config.h" | 23 #include "build/build_config.h" |
| 24 #include "content/renderer/render_view_selection.h" | 24 #include "content/renderer/render_view_selection.h" |
| 25 #include "content/renderer/renderer_webcookiejar_impl.h" | 25 #include "content/renderer/renderer_webcookiejar_impl.h" |
| 26 #include "content/common/content_export.h" | 26 #include "content/common/content_export.h" |
| 27 #include "content/common/edit_command.h" | 27 #include "content/common/edit_command.h" |
| 28 #include "content/common/navigation_gesture.h" | 28 #include "content/common/navigation_gesture.h" |
| 29 #include "content/public/common/page_zoom.h" | 29 #include "content/public/common/page_zoom.h" |
| 30 #include "content/public/common/referrer.h" |
| 30 #include "content/public/common/renderer_preferences.h" | 31 #include "content/public/common/renderer_preferences.h" |
| 31 #include "content/public/common/stop_find_action.h" | 32 #include "content/public/common/stop_find_action.h" |
| 32 #include "content/public/renderer/render_view.h" | 33 #include "content/public/renderer/render_view.h" |
| 33 #include "content/renderer/pepper_plugin_delegate_impl.h" | 34 #include "content/renderer/pepper_plugin_delegate_impl.h" |
| 34 #include "content/renderer/render_widget.h" | 35 #include "content/renderer/render_widget.h" |
| 35 #include "ipc/ipc_platform_file.h" | 36 #include "ipc/ipc_platform_file.h" |
| 36 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" | 37 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" |
| 37 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebFileSyste
m.h" | 38 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebFileSyste
m.h" |
| 38 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h" | 39 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h" |
| 39 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIconURL.h" | 40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIconURL.h" |
| (...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 // title tags will follow meta tags. In here we try to get encoding of | 708 // title tags will follow meta tags. In here we try to get encoding of |
| 708 // page if it has been specified in meta tag. | 709 // page if it has been specified in meta tag. |
| 709 // c) function:DidFinishDocumentLoadForFrame. When this function is | 710 // c) function:DidFinishDocumentLoadForFrame. When this function is |
| 710 // called, that means we have got whole html page. In here we should | 711 // called, that means we have got whole html page. In here we should |
| 711 // finally get right encoding of page. | 712 // finally get right encoding of page. |
| 712 void UpdateEncoding(WebKit::WebFrame* frame, | 713 void UpdateEncoding(WebKit::WebFrame* frame, |
| 713 const std::string& encoding_name); | 714 const std::string& encoding_name); |
| 714 | 715 |
| 715 void OpenURL(WebKit::WebFrame* frame, | 716 void OpenURL(WebKit::WebFrame* frame, |
| 716 const GURL& url, | 717 const GURL& url, |
| 717 const GURL& referrer, | 718 const content::Referrer& referrer, |
| 718 WebKit::WebNavigationPolicy policy); | 719 WebKit::WebNavigationPolicy policy); |
| 719 | 720 |
| 720 bool RunJavaScriptMessage(int type, | 721 bool RunJavaScriptMessage(int type, |
| 721 const string16& message, | 722 const string16& message, |
| 722 const string16& default_value, | 723 const string16& default_value, |
| 723 const GURL& frame_url, | 724 const GURL& frame_url, |
| 724 string16* result); | 725 string16* result); |
| 725 | 726 |
| 726 // Sends a message and runs a nested message loop. | 727 // Sends a message and runs a nested message loop. |
| 727 bool SendAndRunNestedMessageLoop(IPC::SyncMessage* message); | 728 bool SendAndRunNestedMessageLoop(IPC::SyncMessage* message); |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 996 | 997 |
| 997 // Whether this RenderView was created by a frame that was suppressing its | 998 // Whether this RenderView was created by a frame that was suppressing its |
| 998 // opener. If so, we may want to load pages in a separate process. See | 999 // opener. If so, we may want to load pages in a separate process. See |
| 999 // decidePolicyForNavigation for details. | 1000 // decidePolicyForNavigation for details. |
| 1000 bool opener_suppressed_; | 1001 bool opener_suppressed_; |
| 1001 | 1002 |
| 1002 // If we are handling a top-level client-side redirect, this tracks the URL | 1003 // If we are handling a top-level client-side redirect, this tracks the URL |
| 1003 // of the page that initiated it. Specifically, when a load is committed this | 1004 // of the page that initiated it. Specifically, when a load is committed this |
| 1004 // is used to determine if that load originated from a client-side redirect. | 1005 // is used to determine if that load originated from a client-side redirect. |
| 1005 // It is empty if there is no top-level client-side redirect. | 1006 // It is empty if there is no top-level client-side redirect. |
| 1006 GURL completed_client_redirect_src_; | 1007 content::Referrer completed_client_redirect_src_; |
| 1007 | 1008 |
| 1008 // Holds state pertaining to a navigation that we initiated. This is held by | 1009 // Holds state pertaining to a navigation that we initiated. This is held by |
| 1009 // the WebDataSource::ExtraData attribute. We use pending_navigation_state_ | 1010 // the WebDataSource::ExtraData attribute. We use pending_navigation_state_ |
| 1010 // as a temporary holder for the state until the WebDataSource corresponding | 1011 // as a temporary holder for the state until the WebDataSource corresponding |
| 1011 // to the new navigation is created. See DidCreateDataSource. | 1012 // to the new navigation is created. See DidCreateDataSource. |
| 1012 scoped_ptr<ViewMsg_Navigate_Params> pending_navigation_params_; | 1013 scoped_ptr<ViewMsg_Navigate_Params> pending_navigation_params_; |
| 1013 | 1014 |
| 1014 // Timer used to delay the updating of nav state (see SyncNavigationState). | 1015 // Timer used to delay the updating of nav state (see SyncNavigationState). |
| 1015 base::OneShotTimer<RenderViewImpl> nav_state_sync_timer_; | 1016 base::OneShotTimer<RenderViewImpl> nav_state_sync_timer_; |
| 1016 | 1017 |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1226 // bunch of stuff, you should probably create a helper class and put your | 1227 // bunch of stuff, you should probably create a helper class and put your |
| 1227 // data and methods on that to avoid bloating RenderView more. You can | 1228 // data and methods on that to avoid bloating RenderView more. You can |
| 1228 // use the Observer interface to filter IPC messages and receive frame change | 1229 // use the Observer interface to filter IPC messages and receive frame change |
| 1229 // notifications. | 1230 // notifications. |
| 1230 // --------------------------------------------------------------------------- | 1231 // --------------------------------------------------------------------------- |
| 1231 | 1232 |
| 1232 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 1233 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
| 1233 }; | 1234 }; |
| 1234 | 1235 |
| 1235 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 1236 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| OLD | NEW |