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_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 14 matching lines...) Expand all Loading... | |
25 #include "net/base/load_states.h" | 25 #include "net/base/load_states.h" |
26 #include "third_party/WebKit/public/web/WebAXEnums.h" | 26 #include "third_party/WebKit/public/web/WebAXEnums.h" |
27 #include "third_party/WebKit/public/web/WebConsoleMessage.h" | 27 #include "third_party/WebKit/public/web/WebConsoleMessage.h" |
28 #include "third_party/WebKit/public/web/WebPopupType.h" | 28 #include "third_party/WebKit/public/web/WebPopupType.h" |
29 #include "third_party/WebKit/public/web/WebTextDirection.h" | 29 #include "third_party/WebKit/public/web/WebTextDirection.h" |
30 #include "third_party/skia/include/core/SkColor.h" | 30 #include "third_party/skia/include/core/SkColor.h" |
31 #include "ui/accessibility/ax_node_data.h" | 31 #include "ui/accessibility/ax_node_data.h" |
32 #include "ui/base/window_open_disposition.h" | 32 #include "ui/base/window_open_disposition.h" |
33 | 33 |
34 class SkBitmap; | 34 class SkBitmap; |
35 class ViewMsg_Navigate; | 35 class FrameMsg_Navigate; |
36 struct AccessibilityHostMsg_EventParams; | 36 struct AccessibilityHostMsg_EventParams; |
37 struct AccessibilityHostMsg_LocationChangeParams; | 37 struct AccessibilityHostMsg_LocationChangeParams; |
38 struct MediaPlayerAction; | 38 struct MediaPlayerAction; |
39 struct ViewHostMsg_CreateWindow_Params; | 39 struct ViewHostMsg_CreateWindow_Params; |
40 struct ViewHostMsg_OpenURL_Params; | 40 struct ViewHostMsg_OpenURL_Params; |
41 struct ViewHostMsg_SelectionBounds_Params; | 41 struct ViewHostMsg_SelectionBounds_Params; |
42 struct ViewHostMsg_ShowPopup_Params; | 42 struct ViewHostMsg_ShowPopup_Params; |
43 struct ViewMsg_Navigate_Params; | 43 struct FrameMsg_Navigate_Params; |
44 struct ViewMsg_PostMessage_Params; | 44 struct ViewMsg_PostMessage_Params; |
45 | 45 |
46 namespace base { | 46 namespace base { |
47 class ListValue; | 47 class ListValue; |
48 } | 48 } |
49 | 49 |
50 namespace gfx { | 50 namespace gfx { |
51 class Range; | 51 class Range; |
52 } | 52 } |
53 | 53 |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
269 // Returns the content specific prefs for this RenderViewHost. | 269 // Returns the content specific prefs for this RenderViewHost. |
270 WebPreferences GetWebkitPrefs(const GURL& url); | 270 WebPreferences GetWebkitPrefs(const GURL& url); |
271 | 271 |
272 // Sends the given navigation message. Use this rather than sending it | 272 // Sends the given navigation message. Use this rather than sending it |
273 // yourself since this does the internal bookkeeping described below. This | 273 // yourself since this does the internal bookkeeping described below. This |
274 // function takes ownership of the provided message pointer. | 274 // function takes ownership of the provided message pointer. |
275 // | 275 // |
276 // If a cross-site request is in progress, we may be suspended while waiting | 276 // If a cross-site request is in progress, we may be suspended while waiting |
277 // for the onbeforeunload handler, so this function might buffer the message | 277 // for the onbeforeunload handler, so this function might buffer the message |
278 // rather than sending it. | 278 // rather than sending it. |
279 void Navigate(const ViewMsg_Navigate_Params& message); | 279 // TODO(nasko): Remove this method once all callers are converted to use |
280 // RenderFrameHostImpl. | |
281 void Navigate(const FrameMsg_Navigate_Params& message); | |
280 | 282 |
281 // Load the specified URL, this is a shortcut for Navigate(). | 283 // Load the specified URL, this is a shortcut for Navigate(). |
284 // TODO(nasko): Remove this method once all callers are converted to use | |
285 // RenderFrameHostImpl. | |
282 void NavigateToURL(const GURL& url); | 286 void NavigateToURL(const GURL& url); |
283 | 287 |
284 // Returns whether navigation messages are currently suspended for this | 288 // Returns whether navigation messages are currently suspended for this |
285 // RenderViewHost. Only true during a cross-site navigation, while waiting | 289 // RenderViewHost. Only true during a cross-site navigation, while waiting |
286 // for the onbeforeunload handler. | 290 // for the onbeforeunload handler. |
287 bool are_navigations_suspended() const { return navigations_suspended_; } | 291 bool are_navigations_suspended() const { return navigations_suspended_; } |
288 | 292 |
289 // Suspends (or unsuspends) any navigation messages from being sent from this | 293 // Suspends (or unsuspends) any navigation messages from being sent from this |
290 // RenderViewHost. This is called when a pending RenderViewHost is created | 294 // RenderViewHost. This is called when a pending RenderViewHost is created |
291 // for a cross-site navigation, because we must suspend any navigations until | 295 // for a cross-site navigation, because we must suspend any navigations until |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
672 // Whether we should buffer outgoing Navigate messages rather than sending | 676 // Whether we should buffer outgoing Navigate messages rather than sending |
673 // them. This will be true when a RenderViewHost is created for a cross-site | 677 // them. This will be true when a RenderViewHost is created for a cross-site |
674 // request, until we hear back from the onbeforeunload handler of the old | 678 // request, until we hear back from the onbeforeunload handler of the old |
675 // RenderViewHost. | 679 // RenderViewHost. |
676 bool navigations_suspended_; | 680 bool navigations_suspended_; |
677 | 681 |
678 // We only buffer the params for a suspended navigation while we have a | 682 // We only buffer the params for a suspended navigation while we have a |
679 // pending RVH for a WebContentsImpl. There will only ever be one suspended | 683 // pending RVH for a WebContentsImpl. There will only ever be one suspended |
680 // navigation, because WebContentsImpl will destroy the pending RVH and create | 684 // navigation, because WebContentsImpl will destroy the pending RVH and create |
681 // a new one if a second navigation occurs. | 685 // a new one if a second navigation occurs. |
682 scoped_ptr<ViewMsg_Navigate_Params> suspended_nav_params_; | 686 scoped_ptr<FrameMsg_Navigate_Params> suspended_nav_params_; |
Charlie Reis
2014/02/13 01:23:53
Hmm, a bunch of this navigation state belongs on R
nasko
2014/02/13 17:05:27
I think a lot of other state will have to move as
| |
683 | 687 |
684 // Whether the initial empty page of this view has been accessed by another | 688 // Whether the initial empty page of this view has been accessed by another |
685 // page, making it unsafe to show the pending URL. Usually false unless | 689 // page, making it unsafe to show the pending URL. Usually false unless |
686 // another window tries to modify the blank page. Always false after the | 690 // another window tries to modify the blank page. Always false after the |
687 // first commit. | 691 // first commit. |
688 bool has_accessed_initial_document_; | 692 bool has_accessed_initial_document_; |
689 | 693 |
690 // The current state of this RVH. | 694 // The current state of this RVH. |
691 RenderViewHostImplState rvh_state_; | 695 RenderViewHostImplState rvh_state_; |
692 | 696 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
764 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); | 768 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); |
765 }; | 769 }; |
766 | 770 |
767 #if defined(COMPILER_MSVC) | 771 #if defined(COMPILER_MSVC) |
768 #pragma warning(pop) | 772 #pragma warning(pop) |
769 #endif | 773 #endif |
770 | 774 |
771 } // namespace content | 775 } // namespace content |
772 | 776 |
773 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 777 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
OLD | NEW |