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

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: Fix compilation error on windows 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 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 RenderProcessGone(SiteInstanceImpl* site_instance) override;
206
204 // Creates a RenderFrame in the renderer process. 207 // Creates a RenderFrame in the renderer process.
205 bool CreateRenderFrame(int proxy_routing_id, 208 bool CreateRenderFrame(int proxy_routing_id,
206 int opener_routing_id, 209 int opener_routing_id,
207 int parent_routing_id, 210 int parent_routing_id,
208 int previous_sibling_routing_id); 211 int previous_sibling_routing_id);
209 212
210 // Tracks whether the RenderFrame for this RenderFrameHost has been created in 213 // Tracks whether the RenderFrame for this RenderFrameHost has been created in
211 // the renderer process. This is currently only used for subframes. 214 // the renderer process. This is currently only used for subframes.
212 // TODO(creis): Use this for main frames as well when RVH goes away. 215 // TODO(creis): Use this for main frames as well when RVH goes away.
213 void SetRenderFrameCreated(bool created); 216 void SetRenderFrameCreated(bool created);
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 519
517 // Destroys the pending WebUI and resets related data. 520 // Destroys the pending WebUI and resets related data.
518 void ClearPendingWebUI(); 521 void ClearPendingWebUI();
519 522
520 // Destroys all WebUI instances and resets related data. 523 // Destroys all WebUI instances and resets related data.
521 void ClearAllWebUI(); 524 void ClearAllWebUI();
522 525
523 // Returns the Mojo ImageDownloader service. 526 // Returns the Mojo ImageDownloader service.
524 const image_downloader::ImageDownloaderPtr& GetMojoImageDownloader(); 527 const image_downloader::ImageDownloaderPtr& GetMojoImageDownloader();
525 528
529 // Resets the loading state. Following this call, the RenderFrameHost will be
530 // in a non-loading state.
531 void ResetLoadingState();
532
526 protected: 533 protected:
527 friend class RenderFrameHostFactory; 534 friend class RenderFrameHostFactory;
528 535
529 // |flags| is a combination of CreateRenderFrameFlags. 536 // |flags| is a combination of CreateRenderFrameFlags.
530 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost 537 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost
531 // should be the abstraction needed here, but we need RenderViewHost to pass 538 // should be the abstraction needed here, but we need RenderViewHost to pass
532 // into WebContentsObserver::FrameDetached for now. 539 // into WebContentsObserver::FrameDetached for now.
533 RenderFrameHostImpl(SiteInstance* site_instance, 540 RenderFrameHostImpl(SiteInstance* site_instance,
534 RenderViewHostImpl* render_view_host, 541 RenderViewHostImpl* render_view_host,
535 RenderFrameHostDelegate* delegate, 542 RenderFrameHostDelegate* delegate,
(...skipping 25 matching lines...) Expand all
561 const GURL& url, 568 const GURL& url,
562 const base::TimeTicks& navigation_start); 569 const base::TimeTicks& navigation_start);
563 void OnDidFailProvisionalLoadWithError( 570 void OnDidFailProvisionalLoadWithError(
564 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params); 571 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params);
565 void OnDidFailLoadWithError( 572 void OnDidFailLoadWithError(
566 const GURL& url, 573 const GURL& url,
567 int error_code, 574 int error_code,
568 const base::string16& error_description, 575 const base::string16& error_description,
569 bool was_ignored_by_handler); 576 bool was_ignored_by_handler);
570 void OnDidCommitProvisionalLoad(const IPC::Message& msg); 577 void OnDidCommitProvisionalLoad(const IPC::Message& msg);
571 void OnDidDropNavigation();
572 void OnUpdateState(const PageState& state); 578 void OnUpdateState(const PageState& state);
573 void OnBeforeUnloadACK( 579 void OnBeforeUnloadACK(
574 bool proceed, 580 bool proceed,
575 const base::TimeTicks& renderer_before_unload_start_time, 581 const base::TimeTicks& renderer_before_unload_start_time,
576 const base::TimeTicks& renderer_before_unload_end_time); 582 const base::TimeTicks& renderer_before_unload_end_time);
577 void OnSwapOutACK(); 583 void OnSwapOutACK();
578 void OnRenderProcessGone(int status, int error_code); 584 void OnRenderProcessGone(int status, int error_code);
579 void OnContextMenu(const ContextMenuParams& params); 585 void OnContextMenu(const ContextMenuParams& params);
580 void OnJavaScriptExecuteResponse(int id, const base::ListValue& result); 586 void OnJavaScriptExecuteResponse(int id, const base::ListValue& result);
581 void OnVisualStateResponse(uint64_t id); 587 void OnVisualStateResponse(uint64_t id);
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 896
891 // NOTE: This must be the last member. 897 // NOTE: This must be the last member.
892 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; 898 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_;
893 899
894 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); 900 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl);
895 }; 901 };
896 902
897 } // namespace content 903 } // namespace content
898 904
899 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 905 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698