| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_RENDERER_CONTENT_RENDERER_CLIENT_H_ | 5 #ifndef CONTENT_RENDERER_CONTENT_RENDERER_CLIENT_H_ |
| 6 #define CONTENT_RENDERER_CONTENT_RENDERER_CLIENT_H_ | 6 #define CONTENT_RENDERER_CONTENT_RENDERER_CLIENT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 // |url|. If the function returns true, the url is changed to |new_url|. | 88 // |url|. If the function returns true, the url is changed to |new_url|. |
| 89 virtual bool WillSendRequest(WebKit::WebFrame* frame, | 89 virtual bool WillSendRequest(WebKit::WebFrame* frame, |
| 90 const GURL& url, | 90 const GURL& url, |
| 91 GURL* new_url) = 0; | 91 GURL* new_url) = 0; |
| 92 | 92 |
| 93 // Whether to pump events when sending sync cookie messages. Needed if the | 93 // Whether to pump events when sending sync cookie messages. Needed if the |
| 94 // embedder can potentiall put up a modal dialog on the UI thread as a result. | 94 // embedder can potentiall put up a modal dialog on the UI thread as a result. |
| 95 virtual bool ShouldPumpEventsDuringCookieMessage() = 0; | 95 virtual bool ShouldPumpEventsDuringCookieMessage() = 0; |
| 96 | 96 |
| 97 // See the corresponding functions in WebKit::WebFrameClient. | 97 // See the corresponding functions in WebKit::WebFrameClient. |
| 98 virtual void DidCreateScriptContext(WebKit::WebFrame* frame) = 0; | 98 virtual void DidCreateScriptContext(WebKit::WebFrame* frame, |
| 99 virtual void DidDestroyScriptContext(WebKit::WebFrame* frame) = 0; | 99 v8::Handle<v8::Context> context, |
| 100 virtual void DidCreateIsolatedScriptContext( | 100 int world_id) = 0; |
| 101 WebKit::WebFrame* frame, | 101 virtual void WillReleaseScriptContext(WebKit::WebFrame* frame, |
| 102 int world_id, | 102 v8::Handle<v8::Context>, |
| 103 v8::Handle<v8::Context> context) = 0; | 103 int world_id) = 0; |
| 104 | 104 |
| 105 // See WebKit::WebKitPlatformSupport. | 105 // See WebKit::WebKitPlatformSupport. |
| 106 virtual unsigned long long VisitedLinkHash(const char* canonical_url, | 106 virtual unsigned long long VisitedLinkHash(const char* canonical_url, |
| 107 size_t length) = 0; | 107 size_t length) = 0; |
| 108 virtual bool IsLinkVisited(unsigned long long link_hash) = 0; | 108 virtual bool IsLinkVisited(unsigned long long link_hash) = 0; |
| 109 virtual void PrefetchHostName(const char* hostname, size_t length) = 0; | 109 virtual void PrefetchHostName(const char* hostname, size_t length) = 0; |
| 110 virtual bool ShouldOverridePageVisibilityState( | 110 virtual bool ShouldOverridePageVisibilityState( |
| 111 const RenderView* render_view, | 111 const RenderView* render_view, |
| 112 WebKit::WebPageVisibilityState* override_state) const = 0; | 112 WebKit::WebPageVisibilityState* override_state) const = 0; |
| 113 | 113 |
| 114 // Return true if the GetCookie request will be handled by the embedder. | 114 // Return true if the GetCookie request will be handled by the embedder. |
| 115 // Cookies are returned in the cookie parameter. | 115 // Cookies are returned in the cookie parameter. |
| 116 virtual bool HandleGetCookieRequest(RenderView* sender, | 116 virtual bool HandleGetCookieRequest(RenderView* sender, |
| 117 const GURL& url, | 117 const GURL& url, |
| 118 const GURL& first_party_for_cookies, | 118 const GURL& first_party_for_cookies, |
| 119 std::string* cookies) = 0; | 119 std::string* cookies) = 0; |
| 120 | 120 |
| 121 // Return true if the SetCookie request will be handled by the embedder. | 121 // Return true if the SetCookie request will be handled by the embedder. |
| 122 // Cookies to be set are passed in the value parameter. | 122 // Cookies to be set are passed in the value parameter. |
| 123 virtual bool HandleSetCookieRequest(RenderView* sender, | 123 virtual bool HandleSetCookieRequest(RenderView* sender, |
| 124 const GURL& url, | 124 const GURL& url, |
| 125 const GURL& first_party_for_cookies, | 125 const GURL& first_party_for_cookies, |
| 126 const std::string& value) = 0; | 126 const std::string& value) = 0; |
| 127 }; | 127 }; |
| 128 | 128 |
| 129 } // namespace content | 129 } // namespace content |
| 130 | 130 |
| 131 #endif // CONTENT_RENDERER_CONTENT_RENDERER_CLIENT_H_ | 131 #endif // CONTENT_RENDERER_CONTENT_RENDERER_CLIENT_H_ |
| OLD | NEW |