| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-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 // WebCore provides hooks for several kinds of functionality, allowing separate | 5 // WebCore provides hooks for several kinds of functionality, allowing separate |
| 6 // classes termed "delegates" to receive notifications (in the form of direct | 6 // classes termed "delegates" to receive notifications (in the form of direct |
| 7 // function calls) when certain events are about to occur or have just occurred. | 7 // function calls) when certain events are about to occur or have just occurred. |
| 8 // In some cases, the delegate implements the needed functionality; in others, | 8 // In some cases, the delegate implements the needed functionality; in others, |
| 9 // the delegate has some control over the behavior but doesn't actually | 9 // the delegate has some control over the behavior but doesn't actually |
| 10 // implement it. For example, the UI delegate is responsible for showing a | 10 // implement it. For example, the UI delegate is responsible for showing a |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 } | 48 } |
| 49 | 49 |
| 50 class FilePath; | 50 class FilePath; |
| 51 class SkBitmap; | 51 class SkBitmap; |
| 52 class WebDevToolsAgentDelegate; | 52 class WebDevToolsAgentDelegate; |
| 53 class WebView; | 53 class WebView; |
| 54 | 54 |
| 55 // TODO(darin): Eliminate WebViewDelegate in favor of WebViewClient. | 55 // TODO(darin): Eliminate WebViewDelegate in favor of WebViewClient. |
| 56 class WebViewDelegate : public WebKit::WebViewClient { | 56 class WebViewDelegate : public WebKit::WebViewClient { |
| 57 public: | 57 public: |
| 58 // WebView additions ------------------------------------------------------- | |
| 59 | |
| 60 // Returns whether this WebView was opened by a user gesture. | |
| 61 virtual bool WasOpenedByUserGesture() const { | |
| 62 return true; | |
| 63 } | |
| 64 | |
| 65 // DevTools ---------------------------------------------------------------- | 58 // DevTools ---------------------------------------------------------------- |
| 66 | 59 |
| 67 virtual WebDevToolsAgentDelegate* GetWebDevToolsAgentDelegate() { | 60 virtual WebDevToolsAgentDelegate* GetWebDevToolsAgentDelegate() { |
| 68 return NULL; | 61 return NULL; |
| 69 } | 62 } |
| 70 | 63 |
| 71 protected: | 64 protected: |
| 72 ~WebViewDelegate() { } | 65 ~WebViewDelegate() { } |
| 73 }; | 66 }; |
| 74 | 67 |
| 75 #endif // WEBKIT_GLUE_WEBVIEW_DELEGATE_H_ | 68 #endif // WEBKIT_GLUE_WEBVIEW_DELEGATE_H_ |
| OLD | NEW |