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

Side by Side Diff: content/renderer/render_frame_impl.h

Issue 2714943004: Move unique name generation and tracking into //content. (Closed)
Patch Set: . Created 3 years, 9 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_RENDERER_RENDER_FRAME_IMPL_H_ 5 #ifndef CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 25 matching lines...) Expand all
36 #include "content/public/common/console_message_level.h" 36 #include "content/public/common/console_message_level.h"
37 #include "content/public/common/javascript_dialog_type.h" 37 #include "content/public/common/javascript_dialog_type.h"
38 #include "content/public/common/previews_state.h" 38 #include "content/public/common/previews_state.h"
39 #include "content/public/common/referrer.h" 39 #include "content/public/common/referrer.h"
40 #include "content/public/common/request_context_type.h" 40 #include "content/public/common/request_context_type.h"
41 #include "content/public/common/stop_find_action.h" 41 #include "content/public/common/stop_find_action.h"
42 #include "content/public/renderer/render_frame.h" 42 #include "content/public/renderer/render_frame.h"
43 #include "content/renderer/frame_blame_context.h" 43 #include "content/renderer/frame_blame_context.h"
44 #include "content/renderer/mojo/blink_interface_provider_impl.h" 44 #include "content/renderer/mojo/blink_interface_provider_impl.h"
45 #include "content/renderer/renderer_webcookiejar_impl.h" 45 #include "content/renderer/renderer_webcookiejar_impl.h"
46 #include "content/renderer/unique_name_helper.h"
46 #include "ipc/ipc_message.h" 47 #include "ipc/ipc_message.h"
47 #include "ipc/ipc_platform_file.h" 48 #include "ipc/ipc_platform_file.h"
48 #include "media/blink/webmediaplayer_delegate.h" 49 #include "media/blink/webmediaplayer_delegate.h"
49 #include "media/blink/webmediaplayer_params.h" 50 #include "media/blink/webmediaplayer_params.h"
50 #include "media/mojo/interfaces/remoting.mojom.h" 51 #include "media/mojo/interfaces/remoting.mojom.h"
51 #include "mojo/public/cpp/bindings/associated_binding.h" 52 #include "mojo/public/cpp/bindings/associated_binding.h"
52 #include "mojo/public/cpp/bindings/binding.h" 53 #include "mojo/public/cpp/bindings/binding.h"
53 #include "ppapi/features/features.h" 54 #include "ppapi/features/features.h"
54 #include "services/service_manager/public/cpp/service_info.h" 55 #include "services/service_manager/public/cpp/service_info.h"
55 #include "services/service_manager/public/interfaces/connector.mojom.h" 56 #include "services/service_manager/public/interfaces/connector.mojom.h"
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 // See RenderFrameObserver::DidMeaningfulLayout declaration for details. 252 // See RenderFrameObserver::DidMeaningfulLayout declaration for details.
252 void DidMeaningfulLayout(blink::WebMeaningfulLayout layout_type); 253 void DidMeaningfulLayout(blink::WebMeaningfulLayout layout_type);
253 254
254 // Out-of-process child frames receive a signal from RenderWidgetCompositor 255 // Out-of-process child frames receive a signal from RenderWidgetCompositor
255 // when a compositor frame has committed. 256 // when a compositor frame has committed.
256 void DidCommitCompositorFrame(); 257 void DidCommitCompositorFrame();
257 258
258 // Draw commands have been issued by RenderWidgetCompositor. 259 // Draw commands have been issued by RenderWidgetCompositor.
259 void DidCommitAndDrawCompositorFrame(); 260 void DidCommitAndDrawCompositorFrame();
260 261
262 const std::string& unique_name() const { return unique_name_helper_.value(); }
Charlie Reis 2017/03/20 20:11:39 This is still missing the comment.
dcheng 2017/03/21 22:03:41 Done.
263
261 // TODO(jam): this is a temporary getter until all the code is transitioned 264 // TODO(jam): this is a temporary getter until all the code is transitioned
262 // to using RenderFrame instead of RenderView. 265 // to using RenderFrame instead of RenderView.
263 RenderViewImpl* render_view() { return render_view_; } 266 RenderViewImpl* render_view() { return render_view_; }
264 267
265 const blink::WebHistoryItem& current_history_item() { 268 const blink::WebHistoryItem& current_history_item() {
266 return current_history_item_; 269 return current_history_item_;
267 } 270 }
268 271
269 RendererWebCookieJarImpl* cookie_jar() { return &cookie_jar_; } 272 RendererWebCookieJarImpl* cookie_jar() { return &cookie_jar_; }
270 273
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 const blink::WebPopupMenuInfo& popup_menu_info, 500 const blink::WebPopupMenuInfo& popup_menu_info,
498 blink::WebExternalPopupMenuClient* popup_menu_client) override; 501 blink::WebExternalPopupMenuClient* popup_menu_client) override;
499 blink::WebCookieJar* cookieJar() override; 502 blink::WebCookieJar* cookieJar() override;
500 blink::BlameContext* frameBlameContext() override; 503 blink::BlameContext* frameBlameContext() override;
501 blink::WebServiceWorkerProvider* createServiceWorkerProvider() override; 504 blink::WebServiceWorkerProvider* createServiceWorkerProvider() override;
502 void didAccessInitialDocument() override; 505 void didAccessInitialDocument() override;
503 blink::WebLocalFrame* createChildFrame( 506 blink::WebLocalFrame* createChildFrame(
504 blink::WebLocalFrame* parent, 507 blink::WebLocalFrame* parent,
505 blink::WebTreeScopeType scope, 508 blink::WebTreeScopeType scope,
506 const blink::WebString& name, 509 const blink::WebString& name,
507 const blink::WebString& unique_name, 510 const blink::WebString& fallback_name,
508 blink::WebSandboxFlags sandbox_flags, 511 blink::WebSandboxFlags sandbox_flags,
509 const blink::WebFrameOwnerProperties& frame_owner_properties) override; 512 const blink::WebFrameOwnerProperties& frame_owner_properties) override;
510 void didChangeOpener(blink::WebFrame* frame) override; 513 void didChangeOpener(blink::WebFrame* frame) override;
511 void frameDetached(blink::WebLocalFrame* frame, DetachType type) override; 514 void frameDetached(blink::WebLocalFrame* frame, DetachType type) override;
512 void frameFocused() override; 515 void frameFocused() override;
513 void willCommitProvisionalLoad(blink::WebLocalFrame* frame) override; 516 void willCommitProvisionalLoad(blink::WebLocalFrame* frame) override;
514 void didChangeName(const blink::WebString& name, 517 void didChangeName(const blink::WebString& name) override;
515 const blink::WebString& unique_name) override;
516 void didEnforceInsecureRequestPolicy( 518 void didEnforceInsecureRequestPolicy(
517 blink::WebInsecureRequestPolicy policy) override; 519 blink::WebInsecureRequestPolicy policy) override;
518 void didUpdateToUniqueOrigin( 520 void didUpdateToUniqueOrigin(
519 bool is_potentially_trustworthy_unique_origin) override; 521 bool is_potentially_trustworthy_unique_origin) override;
520 void didChangeSandboxFlags(blink::WebFrame* child_frame, 522 void didChangeSandboxFlags(blink::WebFrame* child_frame,
521 blink::WebSandboxFlags flags) override; 523 blink::WebSandboxFlags flags) override;
522 void didSetFeaturePolicyHeader( 524 void didSetFeaturePolicyHeader(
523 const blink::WebParsedFeaturePolicyHeader& parsed_header) override; 525 const blink::WebParsedFeaturePolicyHeader& parsed_header) override;
524 void didAddContentSecurityPolicy( 526 void didAddContentSecurityPolicy(
525 const blink::WebString& header_value, 527 const blink::WebString& header_value,
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 // constructor until BindToWebFrame is called, and it is null after 1123 // constructor until BindToWebFrame is called, and it is null after
1122 // frameDetached is called until destruction (which is asynchronous in the 1124 // frameDetached is called until destruction (which is asynchronous in the
1123 // case of the main frame, but not subframes). 1125 // case of the main frame, but not subframes).
1124 blink::WebLocalFrame* frame_; 1126 blink::WebLocalFrame* frame_;
1125 1127
1126 // Boolean value indicating whether this RenderFrameImpl object is for the 1128 // Boolean value indicating whether this RenderFrameImpl object is for the
1127 // main frame or not. It remains accurate during destruction, even when 1129 // main frame or not. It remains accurate during destruction, even when
1128 // |frame_| has been invalidated. 1130 // |frame_| has been invalidated.
1129 bool is_main_frame_; 1131 bool is_main_frame_;
1130 1132
1133 UniqueNameHelper unique_name_helper_;
1134
1131 // When a frame is detached in response to a message from the browser process, 1135 // When a frame is detached in response to a message from the browser process,
1132 // this RenderFrame should not be sending notifications back to it. This 1136 // this RenderFrame should not be sending notifications back to it. This
1133 // boolean is used to indicate this case. 1137 // boolean is used to indicate this case.
1134 bool in_browser_initiated_detach_; 1138 bool in_browser_initiated_detach_;
1135 1139
1136 // Indicates whether the frame has been inserted into the frame tree yet or 1140 // Indicates whether the frame has been inserted into the frame tree yet or
1137 // not. 1141 // not.
1138 // 1142 //
1139 // When a frame is created by the browser process, it is for a pending 1143 // When a frame is created by the browser process, it is for a pending
1140 // navigation. In this case, it is not immediately attached to the frame tree 1144 // navigation. In this case, it is not immediately attached to the frame tree
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1397 int enabled_bindings_ = 0; 1401 int enabled_bindings_ = 0;
1398 1402
1399 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; 1403 base::WeakPtrFactory<RenderFrameImpl> weak_factory_;
1400 1404
1401 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); 1405 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl);
1402 }; 1406 };
1403 1407
1404 } // namespace content 1408 } // namespace content
1405 1409
1406 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 1410 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698