| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 WEBKIT_GLUE_EMPTY_WEBFRAMECLIENT_H_ | 5 #ifndef WEBKIT_GLUE_EMPTY_WEBFRAMECLIENT_H_ |
| 6 #define WEBKIT_GLUE_EMPTY_WEBFRAMECLIENT_H_ | 6 #define WEBKIT_GLUE_EMPTY_WEBFRAMECLIENT_H_ |
| 7 | 7 |
| 8 #include "webkit/api/public/WebFrameClient.h" | 8 #include "webkit/api/public/WebFrameClient.h" |
| 9 #include "webkit/api/public/WebURLError.h" |
| 9 | 10 |
| 10 namespace webkit_glue { | 11 namespace webkit_glue { |
| 11 | 12 |
| 12 // Extend from this if you only need to override a few WebFrameClient methods. | 13 // Extend from this if you only need to override a few WebFrameClient methods. |
| 13 class EmptyWebFrameClient : public WebKit::WebFrameClient { | 14 class EmptyWebFrameClient : public WebKit::WebFrameClient { |
| 14 public: | 15 public: |
| 15 virtual WebKit::WebPlugin* createPlugin( | 16 virtual WebKit::WebPlugin* createPlugin( |
| 16 WebKit::WebFrame* frame, const WebKit::WebPluginParams& params) { | 17 WebKit::WebFrame* frame, const WebKit::WebPluginParams& params) { |
| 17 return NULL; } | 18 return NULL; } |
| 18 virtual WebKit::WebWorker* createWorker( | 19 virtual WebKit::WebWorker* createWorker( |
| 19 WebKit::WebFrame* frame, WebKit::WebWorkerClient* client) { | 20 WebKit::WebFrame* frame, WebKit::WebWorkerClient* client) { |
| 20 return NULL; } | 21 return NULL; } |
| 21 virtual WebKit::WebMediaPlayer* createMediaPlayer( | 22 virtual WebKit::WebMediaPlayer* createMediaPlayer( |
| 22 WebKit::WebFrame* frame, WebKit::WebMediaPlayerClient* client) { | 23 WebKit::WebFrame* frame, WebKit::WebMediaPlayerClient* client) { |
| 23 return NULL; } | 24 return NULL; } |
| 24 virtual void willClose(WebKit::WebFrame* frame) {} | 25 virtual void willClose(WebKit::WebFrame* frame) {} |
| 25 virtual void loadURLExternally( | 26 virtual void loadURLExternally( |
| 26 WebKit::WebFrame* frame, const WebKit::WebURLRequest& request, | 27 WebKit::WebFrame* frame, const WebKit::WebURLRequest& request, |
| 27 WebKit::WebNavigationPolicy policy) {} | 28 WebKit::WebNavigationPolicy policy) {} |
| 28 virtual WebKit::WebNavigationPolicy decidePolicyForNavigation( | 29 virtual WebKit::WebNavigationPolicy decidePolicyForNavigation( |
| 29 WebKit::WebFrame* frame, const WebKit::WebURLRequest& request, | 30 WebKit::WebFrame* frame, const WebKit::WebURLRequest& request, |
| 30 WebKit::WebNavigationType type, const WebKit::WebNode& originating_node, | 31 WebKit::WebNavigationType type, const WebKit::WebNode& originating_node, |
| 31 WebKit::WebNavigationPolicy default_policy, bool is_redirect) { | 32 WebKit::WebNavigationPolicy default_policy, bool is_redirect) { |
| 32 return default_policy; } | 33 return default_policy; } |
| 34 virtual bool canHandleRequest(const WebKit::WebURLRequest&) { return true; } |
| 35 virtual WebKit::WebURLError cannotShowURLError( |
| 36 const WebKit::WebURLRequest& request) { return WebKit::WebURLError(); } |
| 37 virtual void unableToImplementPolicyWithError( |
| 38 WebKit::WebFrame*, const WebKit::WebURLError&) {} |
| 33 virtual void willSubmitForm(WebKit::WebFrame* frame, | 39 virtual void willSubmitForm(WebKit::WebFrame* frame, |
| 34 const WebKit::WebForm& form) {} | 40 const WebKit::WebForm& form) {} |
| 35 virtual void willPerformClientRedirect( | 41 virtual void willPerformClientRedirect( |
| 36 WebKit::WebFrame* frame, const WebKit::WebURL& from, | 42 WebKit::WebFrame* frame, const WebKit::WebURL& from, |
| 37 const WebKit::WebURL& to, double interval, double fire_time) {} | 43 const WebKit::WebURL& to, double interval, double fire_time) {} |
| 38 virtual void didCancelClientRedirect(WebKit::WebFrame* frame) {} | 44 virtual void didCancelClientRedirect(WebKit::WebFrame* frame) {} |
| 39 virtual void didCompleteClientRedirect( | 45 virtual void didCompleteClientRedirect( |
| 40 WebKit::WebFrame* frame, const WebKit::WebURL& from) {} | 46 WebKit::WebFrame* frame, const WebKit::WebURL& from) {} |
| 41 virtual void didCreateDataSource( | 47 virtual void didCreateDataSource( |
| 42 WebKit::WebFrame* frame, WebKit::WebDataSource* datasource) {} | 48 WebKit::WebFrame* frame, WebKit::WebDataSource* datasource) {} |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 WebKit::WebFrame* frame, const WebKit::WebSize& size) {} | 97 WebKit::WebFrame* frame, const WebKit::WebSize& size) {} |
| 92 virtual void reportFindInPageMatchCount( | 98 virtual void reportFindInPageMatchCount( |
| 93 int identifier, int count, bool final_update) {} | 99 int identifier, int count, bool final_update) {} |
| 94 virtual void reportFindInPageSelection( | 100 virtual void reportFindInPageSelection( |
| 95 int identifier, int ordinal, const WebKit::WebRect& selection) {} | 101 int identifier, int ordinal, const WebKit::WebRect& selection) {} |
| 96 }; | 102 }; |
| 97 | 103 |
| 98 } // namespace webkit_glue | 104 } // namespace webkit_glue |
| 99 | 105 |
| 100 #endif // WEBKIT_GLUE_EMPTY_WEBFRAMECLIENT_H_ | 106 #endif // WEBKIT_GLUE_EMPTY_WEBFRAMECLIENT_H_ |
| OLD | NEW |