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_RENDERER_RENDER_FRAME_H_ | 5 #ifndef CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_ |
6 #define CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_ | 6 #define CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_ |
7 | 7 |
8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.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 "ipc/ipc_listener.h" | 13 #include "ipc/ipc_listener.h" |
13 #include "ipc/ipc_sender.h" | 14 #include "ipc/ipc_sender.h" |
14 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" | 15 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" |
15 | 16 |
16 class GURL; | 17 class GURL; |
17 | 18 |
18 namespace blink { | 19 namespace blink { |
19 class WebElement; | 20 class WebElement; |
20 class WebFrame; | 21 class WebFrame; |
21 class WebLocalFrame; | 22 class WebLocalFrame; |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 // Notifies the browser of text selection changes made. | 137 // Notifies the browser of text selection changes made. |
137 virtual void SetSelectedText(const base::string16& selection_text, | 138 virtual void SetSelectedText(const base::string16& selection_text, |
138 size_t offset, | 139 size_t offset, |
139 const gfx::Range& range) = 0; | 140 const gfx::Range& range) = 0; |
140 | 141 |
141 // Ensures that builtin mojo bindings modules are available in |context|. | 142 // Ensures that builtin mojo bindings modules are available in |context|. |
142 virtual void EnsureMojoBuiltinsAreAvailable( | 143 virtual void EnsureMojoBuiltinsAreAvailable( |
143 v8::Isolate* isolate, | 144 v8::Isolate* isolate, |
144 v8::Local<v8::Context> context) = 0; | 145 v8::Local<v8::Context> context) = 0; |
145 | 146 |
| 147 // Adds |message| to the DevTools console. |
| 148 virtual void AddMessageToConsole(ConsoleMessageLevel level, |
| 149 const std::string& message) = 0; |
| 150 |
146 protected: | 151 protected: |
147 ~RenderFrame() override {} | 152 ~RenderFrame() override {} |
148 | 153 |
149 private: | 154 private: |
150 // This interface should only be implemented inside content. | 155 // This interface should only be implemented inside content. |
151 friend class RenderFrameImpl; | 156 friend class RenderFrameImpl; |
152 RenderFrame() {} | 157 RenderFrame() {} |
153 }; | 158 }; |
154 | 159 |
155 } // namespace content | 160 } // namespace content |
156 | 161 |
157 #endif // CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_ | 162 #endif // CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_ |
OLD | NEW |