OLD | NEW |
---|---|
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" |
11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
12 #include "content/public/common/console_message_level.h" | 12 #include "content/public/common/console_message_level.h" |
13 #include "ipc/ipc_listener.h" | 13 #include "ipc/ipc_listener.h" |
14 #include "ipc/ipc_sender.h" | 14 #include "ipc/ipc_sender.h" |
15 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" | 15 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" |
16 #include "ui/gfx/geometry/rect.h" | 16 #include "ui/gfx/geometry/rect.h" |
17 #include "ui/gfx/native_widget_types.h" | 17 #include "ui/gfx/native_widget_types.h" |
18 #include "url/gurl.h" | 18 #include "url/gurl.h" |
19 #include "url/origin.h" | |
19 | 20 |
20 namespace base { | 21 namespace base { |
21 class Value; | 22 class Value; |
22 } | 23 } |
23 | 24 |
24 namespace content { | 25 namespace content { |
25 class RenderProcessHost; | 26 class RenderProcessHost; |
26 class RenderViewHost; | 27 class RenderViewHost; |
27 class ServiceRegistry; | 28 class ServiceRegistry; |
28 class SiteInstance; | 29 class SiteInstance; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
71 // quite possible for a frame to have no name, in which case GetFrameName will | 72 // quite possible for a frame to have no name, in which case GetFrameName will |
72 // return an empty string. | 73 // return an empty string. |
73 virtual const std::string& GetFrameName() = 0; | 74 virtual const std::string& GetFrameName() = 0; |
74 | 75 |
75 // Returns true if the frame is out of process. | 76 // Returns true if the frame is out of process. |
76 virtual bool IsCrossProcessSubframe() = 0; | 77 virtual bool IsCrossProcessSubframe() = 0; |
77 | 78 |
78 // Returns the last committed URL of the frame. | 79 // Returns the last committed URL of the frame. |
79 virtual GURL GetLastCommittedURL() = 0; | 80 virtual GURL GetLastCommittedURL() = 0; |
80 | 81 |
82 // Returns the last committed origin of the frame. | |
alexmos
2015/11/24 18:23:48
Is it worth adding some sort of note here that it'
ncarter (slow)
2015/11/24 19:35:08
Done.
| |
83 virtual url::Origin GetLastCommittedOrigin() = 0; | |
84 | |
81 // Returns the associated widget's native view. | 85 // Returns the associated widget's native view. |
82 virtual gfx::NativeView GetNativeView() = 0; | 86 virtual gfx::NativeView GetNativeView() = 0; |
83 | 87 |
84 // Adds |message| to the DevTools console. | 88 // Adds |message| to the DevTools console. |
85 virtual void AddMessageToConsole(ConsoleMessageLevel level, | 89 virtual void AddMessageToConsole(ConsoleMessageLevel level, |
86 const std::string& message) = 0; | 90 const std::string& message) = 0; |
87 | 91 |
88 // Runs some JavaScript in this frame's context. If a callback is provided, it | 92 // Runs some JavaScript in this frame's context. If a callback is provided, it |
89 // will be used to return the result, when the result is available. | 93 // will be used to return the result, when the result is available. |
90 // This API can only be called on chrome:// or chrome-devtools:// URLs. | 94 // This API can only be called on chrome:// or chrome-devtools:// URLs. |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
152 | 156 |
153 private: | 157 private: |
154 // This interface should only be implemented inside content. | 158 // This interface should only be implemented inside content. |
155 friend class RenderFrameHostImpl; | 159 friend class RenderFrameHostImpl; |
156 RenderFrameHost() {} | 160 RenderFrameHost() {} |
157 }; | 161 }; |
158 | 162 |
159 } // namespace content | 163 } // namespace content |
160 | 164 |
161 #endif // CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ | 165 #endif // CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ |
OLD | NEW |