OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_CONTENT_RENDERER_CLIENT_H_ | 5 #ifndef CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ |
6 #define CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ | 6 #define CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
11 #include <string> | 11 #include <string> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/bind.h" | 14 #include "base/bind.h" |
15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
17 #include "base/memory/weak_ptr.h" | |
18 #include "base/strings/string16.h" | 17 #include "base/strings/string16.h" |
19 #include "content/public/common/content_client.h" | 18 #include "content/public/common/content_client.h" |
20 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" | 19 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" |
21 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" | 20 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" |
22 #include "third_party/WebKit/public/web/WebNavigationType.h" | 21 #include "third_party/WebKit/public/web/WebNavigationType.h" |
23 #include "ui/base/page_transition_types.h" | 22 #include "ui/base/page_transition_types.h" |
24 #include "v8/include/v8.h" | 23 #include "v8/include/v8.h" |
25 | 24 |
26 class GURL; | 25 class GURL; |
27 class SkBitmap; | 26 class SkBitmap; |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 // Allows an embedder to provide a blink::WebAppBannerClient. | 304 // Allows an embedder to provide a blink::WebAppBannerClient. |
306 virtual scoped_ptr<blink::WebAppBannerClient> CreateAppBannerClient( | 305 virtual scoped_ptr<blink::WebAppBannerClient> CreateAppBannerClient( |
307 RenderFrame* render_frame); | 306 RenderFrame* render_frame); |
308 | 307 |
309 // Gives the embedder a chance to add properties to the context menu. | 308 // Gives the embedder a chance to add properties to the context menu. |
310 // Currently only called when the context menu is for an image. | 309 // Currently only called when the context menu is for an image. |
311 virtual void AddImageContextMenuProperties( | 310 virtual void AddImageContextMenuProperties( |
312 const blink::WebURLResponse& response, | 311 const blink::WebURLResponse& response, |
313 std::map<std::string, std::string>* properties) {} | 312 std::map<std::string, std::string>* properties) {} |
314 | 313 |
| 314 // Notifies that a document element has been inserted in the frame's document. |
| 315 // This may be called multiple times for the same document. This method may |
| 316 // invalidate the frame. |
| 317 virtual void RunScriptsAtDocumentStart(RenderFrame* render_frame) {} |
| 318 |
| 319 // Notifies that the DOM is ready in the frame's document. |
| 320 // This method may invalidate the frame. |
| 321 virtual void RunScriptsAtDocumentEnd(RenderFrame* render_frame) {} |
| 322 |
315 // Notifies that a service worker context has been created. This function | 323 // Notifies that a service worker context has been created. This function |
316 // is called from the worker thread. | 324 // is called from the worker thread. |
317 virtual void DidInitializeServiceWorkerContextOnWorkerThread( | 325 virtual void DidInitializeServiceWorkerContextOnWorkerThread( |
318 v8::Local<v8::Context> context, | 326 v8::Local<v8::Context> context, |
319 const GURL& url) {} | 327 const GURL& url) {} |
320 | 328 |
321 // Notifies that a service worker context will be destroyed. This function | 329 // Notifies that a service worker context will be destroyed. This function |
322 // is called from the worker thread. | 330 // is called from the worker thread. |
323 virtual void WillDestroyServiceWorkerContextOnWorkerThread( | 331 virtual void WillDestroyServiceWorkerContextOnWorkerThread( |
324 v8::Local<v8::Context> context, | 332 v8::Local<v8::Context> context, |
325 const GURL& url) {} | 333 const GURL& url) {} |
326 | 334 |
327 // Whether this renderer should enforce preferences related to the WebRTC | 335 // Whether this renderer should enforce preferences related to the WebRTC |
328 // routing logic, i.e. allowing multiple routes and non-proxied UDP. | 336 // routing logic, i.e. allowing multiple routes and non-proxied UDP. |
329 virtual bool ShouldEnforceWebRTCRoutingPreferences(); | 337 virtual bool ShouldEnforceWebRTCRoutingPreferences(); |
330 }; | 338 }; |
331 | 339 |
332 } // namespace content | 340 } // namespace content |
333 | 341 |
334 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ | 342 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ |
OLD | NEW |