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

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: Rebase on top of 1605763002 Created 4 years, 11 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 {
clamy 2016/01/20 13:23:45 I tried to get RenderFrameHostManager to properly
carlosk 2016/01/20 14:05:14 Looks better this way. Note to other reviewers: i
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 bool AccessibilityViewHasFocus() const override; 194 bool AccessibilityViewHasFocus() const override;
195 gfx::Rect AccessibilityGetViewBounds() const override; 195 gfx::Rect AccessibilityGetViewBounds() const override;
196 gfx::Point AccessibilityOriginInScreen( 196 gfx::Point AccessibilityOriginInScreen(
197 const gfx::Rect& bounds) const override; 197 const gfx::Rect& bounds) const override;
198 void AccessibilityHitTest(const gfx::Point& point) override; 198 void AccessibilityHitTest(const gfx::Point& point) override;
199 void AccessibilitySetAccessibilityFocus(int acc_obj_id) override; 199 void AccessibilitySetAccessibilityFocus(int acc_obj_id) override;
200 void AccessibilityFatalError() override; 200 void AccessibilityFatalError() override;
201 gfx::AcceleratedWidget AccessibilityGetAcceleratedWidget() override; 201 gfx::AcceleratedWidget AccessibilityGetAcceleratedWidget() override;
202 gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible() override; 202 gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible() override;
203 203
204 // SiteInstanceImpl::Observer
205 void ActiveFrameCountIsZero(SiteInstanceImpl* site_instance) override;
206 void RenderProcessGone(SiteInstanceImpl* site_instance) override;
207
204 // Creates a RenderFrame in the renderer process. 208 // Creates a RenderFrame in the renderer process.
205 bool CreateRenderFrame(int proxy_routing_id, 209 bool CreateRenderFrame(int proxy_routing_id,
206 int opener_routing_id, 210 int opener_routing_id,
207 int parent_routing_id, 211 int parent_routing_id,
208 int previous_sibling_routing_id); 212 int previous_sibling_routing_id);
209 213
210 // Tracks whether the RenderFrame for this RenderFrameHost has been created in 214 // Tracks whether the RenderFrame for this RenderFrameHost has been created in
211 // the renderer process. This is currently only used for subframes. 215 // the renderer process. This is currently only used for subframes.
212 // TODO(creis): Use this for main frames as well when RVH goes away. 216 // TODO(creis): Use this for main frames as well when RVH goes away.
213 void SetRenderFrameCreated(bool created); 217 void SetRenderFrameCreated(bool created);
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 520
517 // Destroys the pending WebUI and resets related data. 521 // Destroys the pending WebUI and resets related data.
518 void ClearPendingWebUI(); 522 void ClearPendingWebUI();
519 523
520 // Destroys all WebUI instances and resets related data. 524 // Destroys all WebUI instances and resets related data.
521 void ClearAllWebUI(); 525 void ClearAllWebUI();
522 526
523 // Returns the Mojo ImageDownloader service. 527 // Returns the Mojo ImageDownloader service.
524 const image_downloader::ImageDownloaderPtr& GetMojoImageDownloader(); 528 const image_downloader::ImageDownloaderPtr& GetMojoImageDownloader();
525 529
530 // Resets the loading state. Following this call, the RenderFrameHost will be
531 // in a non-loading state.
532 void ResetLoadingState();
533
526 protected: 534 protected:
527 friend class RenderFrameHostFactory; 535 friend class RenderFrameHostFactory;
528 536
529 // |flags| is a combination of CreateRenderFrameFlags. 537 // |flags| is a combination of CreateRenderFrameFlags.
530 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost 538 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost
531 // should be the abstraction needed here, but we need RenderViewHost to pass 539 // should be the abstraction needed here, but we need RenderViewHost to pass
532 // into WebContentsObserver::FrameDetached for now. 540 // into WebContentsObserver::FrameDetached for now.
533 RenderFrameHostImpl(SiteInstance* site_instance, 541 RenderFrameHostImpl(SiteInstance* site_instance,
534 RenderViewHostImpl* render_view_host, 542 RenderViewHostImpl* render_view_host,
535 RenderFrameHostDelegate* delegate, 543 RenderFrameHostDelegate* delegate,
(...skipping 25 matching lines...) Expand all
561 const GURL& url, 569 const GURL& url,
562 const base::TimeTicks& navigation_start); 570 const base::TimeTicks& navigation_start);
563 void OnDidFailProvisionalLoadWithError( 571 void OnDidFailProvisionalLoadWithError(
564 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params); 572 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params);
565 void OnDidFailLoadWithError( 573 void OnDidFailLoadWithError(
566 const GURL& url, 574 const GURL& url,
567 int error_code, 575 int error_code,
568 const base::string16& error_description, 576 const base::string16& error_description,
569 bool was_ignored_by_handler); 577 bool was_ignored_by_handler);
570 void OnDidCommitProvisionalLoad(const IPC::Message& msg); 578 void OnDidCommitProvisionalLoad(const IPC::Message& msg);
571 void OnDidDropNavigation();
572 void OnUpdateState(const PageState& state); 579 void OnUpdateState(const PageState& state);
573 void OnBeforeUnloadACK( 580 void OnBeforeUnloadACK(
574 bool proceed, 581 bool proceed,
575 const base::TimeTicks& renderer_before_unload_start_time, 582 const base::TimeTicks& renderer_before_unload_start_time,
576 const base::TimeTicks& renderer_before_unload_end_time); 583 const base::TimeTicks& renderer_before_unload_end_time);
577 void OnSwapOutACK(); 584 void OnSwapOutACK();
578 void OnRenderProcessGone(int status, int error_code); 585 void OnRenderProcessGone(int status, int error_code);
579 void OnContextMenu(const ContextMenuParams& params); 586 void OnContextMenu(const ContextMenuParams& params);
580 void OnJavaScriptExecuteResponse(int id, const base::ListValue& result); 587 void OnJavaScriptExecuteResponse(int id, const base::ListValue& result);
581 void OnVisualStateResponse(uint64_t id); 588 void OnVisualStateResponse(uint64_t id);
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 897
891 // NOTE: This must be the last member. 898 // NOTE: This must be the last member.
892 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; 899 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_;
893 900
894 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); 901 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl);
895 }; 902 };
896 903
897 } // namespace content 904 } // namespace content
898 905
899 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 906 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698