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

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

Issue 298283003: Add WasShown/WasHidden to RenderFrameObserver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add basic test on browser side. Created 6 years, 7 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 | Annotate | Revision Log
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 <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/strings/string16.h" 14 #include "base/strings/string16.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "content/browser/renderer_host/render_view_host_impl.h"
17 #include "content/browser/renderer_host/render_widget_host_impl.h"
jam 2014/05/28 17:55:37 nit: personally i wouldn't include such big header
nasko 2014/05/28 18:26:11 Done.
16 #include "content/common/content_export.h" 18 #include "content/common/content_export.h"
17 #include "content/public/browser/render_frame_host.h" 19 #include "content/public/browser/render_frame_host.h"
18 #include "content/public/common/javascript_message_type.h" 20 #include "content/public/common/javascript_message_type.h"
19 #include "content/public/common/page_transition_types.h" 21 #include "content/public/common/page_transition_types.h"
20 #include "third_party/WebKit/public/web/WebTextDirection.h" 22 #include "third_party/WebKit/public/web/WebTextDirection.h"
21 23
22 class GURL; 24 class GURL;
23 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params; 25 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params;
24 struct FrameHostMsg_OpenURL_Params; 26 struct FrameHostMsg_OpenURL_Params;
25 struct FrameMsg_Navigate_Params; 27 struct FrameMsg_Navigate_Params;
26 28
27 namespace base { 29 namespace base {
28 class FilePath; 30 class FilePath;
29 class ListValue; 31 class ListValue;
30 } 32 }
31 33
32 namespace content { 34 namespace content {
33 35
34 class CrossProcessFrameConnector; 36 class CrossProcessFrameConnector;
35 class CrossSiteTransferringRequest; 37 class CrossSiteTransferringRequest;
36 class FrameTree; 38 class FrameTree;
37 class FrameTreeNode; 39 class FrameTreeNode;
38 class RenderFrameHostDelegate; 40 class RenderFrameHostDelegate;
39 class RenderFrameProxyHost; 41 class RenderFrameProxyHost;
40 class RenderProcessHost; 42 class RenderProcessHost;
41 class RenderViewHostImpl; 43 class RenderViewHostImpl;
44 class RenderWidgetHostImpl;
42 struct ContextMenuParams; 45 struct ContextMenuParams;
43 struct GlobalRequestID; 46 struct GlobalRequestID;
44 struct Referrer; 47 struct Referrer;
45 struct ShowDesktopNotificationHostMsgParams; 48 struct ShowDesktopNotificationHostMsgParams;
46 49
47 class CONTENT_EXPORT RenderFrameHostImpl : public RenderFrameHost { 50 class CONTENT_EXPORT RenderFrameHostImpl : public RenderFrameHost {
48 public: 51 public:
49 static RenderFrameHostImpl* FromID(int process_id, int routing_id); 52 static RenderFrameHostImpl* FromID(int process_id, int routing_id);
50 53
51 virtual ~RenderFrameHostImpl(); 54 virtual ~RenderFrameHostImpl();
(...skipping 21 matching lines...) Expand all
73 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 76 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
74 77
75 void Init(); 78 void Init();
76 int routing_id() const { return routing_id_; } 79 int routing_id() const { return routing_id_; }
77 void OnCreateChildFrame(int new_routing_id, 80 void OnCreateChildFrame(int new_routing_id,
78 const std::string& frame_name); 81 const std::string& frame_name);
79 82
80 RenderViewHostImpl* render_view_host() { return render_view_host_; } 83 RenderViewHostImpl* render_view_host() { return render_view_host_; }
81 RenderFrameHostDelegate* delegate() { return delegate_; } 84 RenderFrameHostDelegate* delegate() { return delegate_; }
82 FrameTreeNode* frame_tree_node() { return frame_tree_node_; } 85 FrameTreeNode* frame_tree_node() { return frame_tree_node_; }
86 // TODO(nasko): The RenderWidgetHost will be owned by RenderFrameHost in
87 // the future, so update this accessor to return the right pointer.
88 RenderWidgetHostImpl* render_widget_host() {
89 return static_cast<RenderWidgetHostImpl*>(render_view_host_);
90 }
83 91
84 // This function is called when this is a swapped out RenderFrameHost that 92 // This function is called when this is a swapped out RenderFrameHost that
85 // lives in the same process as the parent frame. The 93 // lives in the same process as the parent frame. The
86 // |cross_process_frame_connector| allows the non-swapped-out 94 // |cross_process_frame_connector| allows the non-swapped-out
87 // RenderFrameHost for a frame to communicate with the parent process 95 // RenderFrameHost for a frame to communicate with the parent process
88 // so that it may composite drawing data. 96 // so that it may composite drawing data.
89 // 97 //
90 // Ownership is not transfered. 98 // Ownership is not transfered.
91 void set_cross_process_frame_connector( 99 void set_cross_process_frame_connector(
92 CrossProcessFrameConnector* cross_process_frame_connector) { 100 CrossProcessFrameConnector* cross_process_frame_connector) {
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 base::TimeTicks send_before_unload_start_time_; 295 base::TimeTicks send_before_unload_start_time_;
288 296
289 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; 297 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_;
290 298
291 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); 299 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl);
292 }; 300 };
293 301
294 } // namespace content 302 } // namespace content
295 303
296 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 304 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/site_per_process_browsertest.cc » ('j') | content/renderer/render_widget.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698