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

Unified Diff: content/renderer/render_frame_impl.h

Issue 2714943004: Move unique name generation and tracking into //content. (Closed)
Patch Set: Revert back to original check in didUpdateName Created 3 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/render_frame_impl.h
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index d1731be222111b2dea5bf60785f8dfa10e02e495..ccef19cf0bd2e7c2f7bba78f6afd8ef8ed3ec727 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -43,6 +43,7 @@
#include "content/renderer/frame_blame_context.h"
#include "content/renderer/mojo/blink_interface_provider_impl.h"
#include "content/renderer/renderer_webcookiejar_impl.h"
+#include "content/renderer/unique_name_helper.h"
#include "ipc/ipc_message.h"
#include "ipc/ipc_platform_file.h"
#include "media/blink/webmediaplayer_delegate.h"
@@ -258,6 +259,8 @@ class CONTENT_EXPORT RenderFrameImpl
// Draw commands have been issued by RenderWidgetCompositor.
void DidCommitAndDrawCompositorFrame();
+ const std::string& unique_name() const { return unique_name_helper_.value(); }
Charlie Reis 2017/03/02 23:59:17 Worth a comment. Something like: Returns a name
dcheng 2017/03/03 10:22:08 Done.
+
// TODO(jam): this is a temporary getter until all the code is transitioned
// to using RenderFrame instead of RenderView.
RenderViewImpl* render_view() { return render_view_; }
@@ -504,15 +507,14 @@ class CONTENT_EXPORT RenderFrameImpl
blink::WebLocalFrame* parent,
blink::WebTreeScopeType scope,
const blink::WebString& name,
- const blink::WebString& unique_name,
+ const blink::WebString& fallback_name,
blink::WebSandboxFlags sandbox_flags,
const blink::WebFrameOwnerProperties& frame_owner_properties) override;
void didChangeOpener(blink::WebFrame* frame) override;
void frameDetached(blink::WebLocalFrame* frame, DetachType type) override;
void frameFocused() override;
void willCommitProvisionalLoad(blink::WebLocalFrame* frame) override;
- void didChangeName(const blink::WebString& name,
- const blink::WebString& unique_name) override;
+ void didChangeName(const blink::WebString& name) override;
void didEnforceInsecureRequestPolicy(
blink::WebInsecureRequestPolicy policy) override;
void didUpdateToUniqueOrigin(
@@ -1128,6 +1130,8 @@ class CONTENT_EXPORT RenderFrameImpl
// |frame_| has been invalidated.
bool is_main_frame_;
+ UniqueNameHelper unique_name_helper_;
+
// When a frame is detached in response to a message from the browser process,
// this RenderFrame should not be sending notifications back to it. This
// boolean is used to indicate this case.

Powered by Google App Engine
This is Rietveld 408576698