| 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_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/string16.h" | 13 #include "base/string16.h" |
| 14 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
| 15 #include "content/public/browser/navigation_type.h" | 15 #include "content/public/browser/navigation_type.h" |
| 16 #include "content/public/common/page_transition_types.h" | 16 #include "content/public/common/page_transition_types.h" |
| 17 #include "content/public/common/window_container_type.h" | 17 #include "content/public/common/window_container_type.h" |
| 18 #include "ui/gfx/native_widget_types.h" | 18 #include "ui/gfx/native_widget_types.h" |
| 19 #include "webkit/glue/window_open_disposition.h" | 19 #include "webkit/glue/window_open_disposition.h" |
| 20 | 20 |
| 21 class FilePath; | 21 class FilePath; |
| 22 class GURL; | 22 class GURL; |
| 23 class TabContents; | 23 class TabContents; |
| 24 struct ContextMenuParams; | |
| 25 struct NativeWebKeyboardEvent; | 24 struct NativeWebKeyboardEvent; |
| 26 | 25 |
| 27 namespace base { | 26 namespace base { |
| 28 class ListValue; | 27 class ListValue; |
| 29 } | 28 } |
| 30 | 29 |
| 31 namespace content { | 30 namespace content { |
| 32 class BrowserContext; | 31 class BrowserContext; |
| 33 class DownloadItem; | 32 class DownloadItem; |
| 34 class JavaScriptDialogCreator; | 33 class JavaScriptDialogCreator; |
| 35 class WebContents; | 34 class WebContents; |
| 36 class WebIntentsDispatcher; | 35 class WebIntentsDispatcher; |
| 36 struct ContextMenuParams; |
| 37 struct FileChooserParams; | 37 struct FileChooserParams; |
| 38 struct SSLStatus; | 38 struct SSLStatus; |
| 39 } | 39 } |
| 40 | 40 |
| 41 namespace gfx { | 41 namespace gfx { |
| 42 class Point; | 42 class Point; |
| 43 class Rect; | 43 class Rect; |
| 44 class Size; | 44 class Size; |
| 45 } | 45 } |
| 46 | 46 |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 | 212 |
| 213 // Notifies the delegate that a download is starting. | 213 // Notifies the delegate that a download is starting. |
| 214 virtual void OnStartDownload(WebContents* source, DownloadItem* download) {} | 214 virtual void OnStartDownload(WebContents* source, DownloadItem* download) {} |
| 215 | 215 |
| 216 // Return much extra vertical space should be allotted to the | 216 // Return much extra vertical space should be allotted to the |
| 217 // render view widget during various animations (e.g. infobar closing). | 217 // render view widget during various animations (e.g. infobar closing). |
| 218 // This is used to make painting look smoother. | 218 // This is used to make painting look smoother. |
| 219 virtual int GetExtraRenderViewHeight() const; | 219 virtual int GetExtraRenderViewHeight() const; |
| 220 | 220 |
| 221 // Returns true if the context menu operation was handled by the delegate. | 221 // Returns true if the context menu operation was handled by the delegate. |
| 222 virtual bool HandleContextMenu(const ContextMenuParams& params); | 222 virtual bool HandleContextMenu(const content::ContextMenuParams& params); |
| 223 | 223 |
| 224 // Returns true if the context menu command was handled | 224 // Returns true if the context menu command was handled |
| 225 virtual bool ExecuteContextMenuCommand(int command); | 225 virtual bool ExecuteContextMenuCommand(int command); |
| 226 | 226 |
| 227 // Shows the page info using the specified information. | 227 // Shows the page info using the specified information. |
| 228 // |url| is the url of the page/frame the info applies to, |ssl| is the SSL | 228 // |url| is the url of the page/frame the info applies to, |ssl| is the SSL |
| 229 // information for that page/frame. If |show_history| is true, a section | 229 // information for that page/frame. If |show_history| is true, a section |
| 230 // showing how many times that URL has been visited is added to the page info. | 230 // showing how many times that URL has been visited is added to the page info. |
| 231 virtual void ShowPageInfo(content::BrowserContext* browser_context, | 231 virtual void ShowPageInfo(content::BrowserContext* browser_context, |
| 232 const GURL& url, | 232 const GURL& url, |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 // Called when |this| is no longer the WebContentsDelegate for |source|. | 397 // Called when |this| is no longer the WebContentsDelegate for |source|. |
| 398 void Detach(WebContents* source); | 398 void Detach(WebContents* source); |
| 399 | 399 |
| 400 // The WebContents that this is currently a delegate for. | 400 // The WebContents that this is currently a delegate for. |
| 401 std::set<WebContents*> attached_contents_; | 401 std::set<WebContents*> attached_contents_; |
| 402 }; | 402 }; |
| 403 | 403 |
| 404 } // namespace content | 404 } // namespace content |
| 405 | 405 |
| 406 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 406 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |