Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.h

Issue 1545973002: Remove the is_loading_ field from WebContentsImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed issue with tests Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 struct ResourceResponse; 88 struct ResourceResponse;
89 89
90 // Flag arguments for RenderFrameHost creation. 90 // Flag arguments for RenderFrameHost creation.
91 enum CreateRenderFrameFlags { 91 enum CreateRenderFrameFlags {
92 // The RFH will be initially placed on the swapped out hosts list. 92 // The RFH will be initially placed on the swapped out hosts list.
93 CREATE_RF_SWAPPED_OUT = 1 << 0, 93 CREATE_RF_SWAPPED_OUT = 1 << 0,
94 // The RenderFrame is initially hidden. 94 // The RenderFrame is initially hidden.
95 CREATE_RF_HIDDEN = 1 << 1, 95 CREATE_RF_HIDDEN = 1 << 1,
96 }; 96 };
97 97
98 class CONTENT_EXPORT RenderFrameHostImpl 98 class CONTENT_EXPORT RenderFrameHostImpl : public RenderFrameHost,
99 : public RenderFrameHost, 99 public BrowserAccessibilityDelegate,
100 public BrowserAccessibilityDelegate { 100 public SiteInstanceImpl::Observer {
101 public: 101 public:
102 using AXTreeSnapshotCallback = 102 using AXTreeSnapshotCallback =
103 base::Callback<void( 103 base::Callback<void(
104 const ui::AXTreeUpdate&)>; 104 const ui::AXTreeUpdate&)>;
105 105
106 // Keeps track of the state of the RenderFrameHostImpl, particularly with 106 // Keeps track of the state of the RenderFrameHostImpl, particularly with
107 // respect to swap out. 107 // respect to swap out.
108 enum RenderFrameHostImplState { 108 enum RenderFrameHostImplState {
109 // The standard state for a RFH handling the communication with an active 109 // The standard state for a RFH handling the communication with an active
110 // RenderFrame. 110 // RenderFrame.
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 bool AccessibilityViewHasFocus() const override; 199 bool AccessibilityViewHasFocus() const override;
200 gfx::Rect AccessibilityGetViewBounds() const override; 200 gfx::Rect AccessibilityGetViewBounds() const override;
201 gfx::Point AccessibilityOriginInScreen( 201 gfx::Point AccessibilityOriginInScreen(
202 const gfx::Rect& bounds) const override; 202 const gfx::Rect& bounds) const override;
203 void AccessibilityHitTest(const gfx::Point& point) override; 203 void AccessibilityHitTest(const gfx::Point& point) override;
204 void AccessibilitySetAccessibilityFocus(int acc_obj_id) override; 204 void AccessibilitySetAccessibilityFocus(int acc_obj_id) override;
205 void AccessibilityFatalError() override; 205 void AccessibilityFatalError() override;
206 gfx::AcceleratedWidget AccessibilityGetAcceleratedWidget() override; 206 gfx::AcceleratedWidget AccessibilityGetAcceleratedWidget() override;
207 gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible() override; 207 gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible() override;
208 208
209 // SiteInstanceImpl::Observer
210 void RenderProcessGone(SiteInstanceImpl* site_instance) override;
211
209 // Creates a RenderFrame in the renderer process. 212 // Creates a RenderFrame in the renderer process.
210 bool CreateRenderFrame(int proxy_routing_id, 213 bool CreateRenderFrame(int proxy_routing_id,
211 int opener_routing_id, 214 int opener_routing_id,
212 int parent_routing_id, 215 int parent_routing_id,
213 int previous_sibling_routing_id); 216 int previous_sibling_routing_id);
214 217
215 // Tracks whether the RenderFrame for this RenderFrameHost has been created in 218 // Tracks whether the RenderFrame for this RenderFrameHost has been created in
216 // the renderer process. This is currently only used for subframes. 219 // the renderer process. This is currently only used for subframes.
217 // TODO(creis): Use this for main frames as well when RVH goes away. 220 // TODO(creis): Use this for main frames as well when RVH goes away.
218 void SetRenderFrameCreated(bool created); 221 void SetRenderFrameCreated(bool created);
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 521
519 // Destroys the pending WebUI and resets related data. 522 // Destroys the pending WebUI and resets related data.
520 void ClearPendingWebUI(); 523 void ClearPendingWebUI();
521 524
522 // Destroys all WebUI instances and resets related data. 525 // Destroys all WebUI instances and resets related data.
523 void ClearAllWebUI(); 526 void ClearAllWebUI();
524 527
525 // Returns the Mojo ImageDownloader service. 528 // Returns the Mojo ImageDownloader service.
526 const image_downloader::ImageDownloaderPtr& GetMojoImageDownloader(); 529 const image_downloader::ImageDownloaderPtr& GetMojoImageDownloader();
527 530
531 // Resets the loading state. Following this call, the RenderFrameHost will be
532 // in a non-loading state.
533 void ResetLoadingState();
534
528 protected: 535 protected:
529 friend class RenderFrameHostFactory; 536 friend class RenderFrameHostFactory;
530 537
531 // |flags| is a combination of CreateRenderFrameFlags. 538 // |flags| is a combination of CreateRenderFrameFlags.
532 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost 539 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost
533 // should be the abstraction needed here, but we need RenderViewHost to pass 540 // should be the abstraction needed here, but we need RenderViewHost to pass
534 // into WebContentsObserver::FrameDetached for now. 541 // into WebContentsObserver::FrameDetached for now.
535 RenderFrameHostImpl(SiteInstance* site_instance, 542 RenderFrameHostImpl(SiteInstance* site_instance,
536 RenderViewHostImpl* render_view_host, 543 RenderViewHostImpl* render_view_host,
537 RenderFrameHostDelegate* delegate, 544 RenderFrameHostDelegate* delegate,
(...skipping 25 matching lines...) Expand all
563 const GURL& url, 570 const GURL& url,
564 const base::TimeTicks& navigation_start); 571 const base::TimeTicks& navigation_start);
565 void OnDidFailProvisionalLoadWithError( 572 void OnDidFailProvisionalLoadWithError(
566 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params); 573 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params);
567 void OnDidFailLoadWithError( 574 void OnDidFailLoadWithError(
568 const GURL& url, 575 const GURL& url,
569 int error_code, 576 int error_code,
570 const base::string16& error_description, 577 const base::string16& error_description,
571 bool was_ignored_by_handler); 578 bool was_ignored_by_handler);
572 void OnDidCommitProvisionalLoad(const IPC::Message& msg); 579 void OnDidCommitProvisionalLoad(const IPC::Message& msg);
573 void OnDidDropNavigation();
574 void OnUpdateState(const PageState& state); 580 void OnUpdateState(const PageState& state);
575 void OnBeforeUnloadACK( 581 void OnBeforeUnloadACK(
576 bool proceed, 582 bool proceed,
577 const base::TimeTicks& renderer_before_unload_start_time, 583 const base::TimeTicks& renderer_before_unload_start_time,
578 const base::TimeTicks& renderer_before_unload_end_time); 584 const base::TimeTicks& renderer_before_unload_end_time);
579 void OnSwapOutACK(); 585 void OnSwapOutACK();
580 void OnRenderProcessGone(int status, int error_code); 586 void OnRenderProcessGone(int status, int error_code);
581 void OnContextMenu(const ContextMenuParams& params); 587 void OnContextMenu(const ContextMenuParams& params);
582 void OnJavaScriptExecuteResponse(int id, const base::ListValue& result); 588 void OnJavaScriptExecuteResponse(int id, const base::ListValue& result);
583 void OnVisualStateResponse(uint64_t id); 589 void OnVisualStateResponse(uint64_t id);
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 898
893 // NOTE: This must be the last member. 899 // NOTE: This must be the last member.
894 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; 900 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_;
895 901
896 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); 902 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl);
897 }; 903 };
898 904
899 } // namespace content 905 } // namespace content
900 906
901 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 907 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698