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

Side by Side Diff: content/public/browser/render_frame_host.h

Issue 2546533007: Store the last committed origin in RenderFrameHostImpl. (Closed)
Patch Set: Rebase (and remove DCHECK) Created 4 years 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_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_
6 #define CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ 6 #define CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // return an empty string. 104 // return an empty string.
105 virtual const std::string& GetFrameName() = 0; 105 virtual const std::string& GetFrameName() = 0;
106 106
107 // Returns true if the frame is out of process. 107 // Returns true if the frame is out of process.
108 virtual bool IsCrossProcessSubframe() = 0; 108 virtual bool IsCrossProcessSubframe() = 0;
109 109
110 // Returns the last committed URL of the frame. 110 // Returns the last committed URL of the frame.
111 virtual const GURL& GetLastCommittedURL() = 0; 111 virtual const GURL& GetLastCommittedURL() = 0;
112 112
113 // Returns the last committed origin of the frame. 113 // Returns the last committed origin of the frame.
114 // 114 virtual const url::Origin& GetLastCommittedOrigin() = 0;
alexmos 2016/12/06 17:22:40 We should be able to remove the hack introduced in
Charlie Reis 2016/12/08 19:51:47 Acknowledged.
115 // The origin is only available if this RenderFrameHost is current in the
116 // frame tree -- i.e., it would be visited by WebContents::ForEachFrame. In
117 // particular, this method may CHECK if called from
118 // WebContentsObserver::RenderFrameCreated, since non-current frames can be
119 // passed to that observer method.
120 virtual url::Origin GetLastCommittedOrigin() = 0;
121 115
122 // Returns the associated widget's native view. 116 // Returns the associated widget's native view.
123 virtual gfx::NativeView GetNativeView() = 0; 117 virtual gfx::NativeView GetNativeView() = 0;
124 118
125 // Adds |message| to the DevTools console. 119 // Adds |message| to the DevTools console.
126 virtual void AddMessageToConsole(ConsoleMessageLevel level, 120 virtual void AddMessageToConsole(ConsoleMessageLevel level,
127 const std::string& message) = 0; 121 const std::string& message) = 0;
128 122
129 // Runs some JavaScript in this frame's context. If a callback is provided, it 123 // Runs some JavaScript in this frame's context. If a callback is provided, it
130 // will be used to return the result, when the result is available. 124 // will be used to return the result, when the result is available.
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 224
231 private: 225 private:
232 // This interface should only be implemented inside content. 226 // This interface should only be implemented inside content.
233 friend class RenderFrameHostImpl; 227 friend class RenderFrameHostImpl;
234 RenderFrameHost() {} 228 RenderFrameHost() {}
235 }; 229 };
236 230
237 } // namespace content 231 } // namespace content
238 232
239 #endif // CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ 233 #endif // CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698