| 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 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 namespace base { | 26 namespace base { |
| 27 class FilePath; | 27 class FilePath; |
| 28 class ListValue; | 28 class ListValue; |
| 29 } | 29 } |
| 30 | 30 |
| 31 namespace content { | 31 namespace content { |
| 32 class BrowserContext; | 32 class BrowserContext; |
| 33 class ColorChooser; | 33 class ColorChooser; |
| 34 class DownloadItem; | 34 class DownloadItem; |
| 35 class JavaScriptDialogManager; | 35 class JavaScriptDialogManager; |
| 36 class PageState; |
| 36 class RenderViewHost; | 37 class RenderViewHost; |
| 37 class WebContents; | 38 class WebContents; |
| 38 class WebContentsImpl; | 39 class WebContentsImpl; |
| 39 struct ContextMenuParams; | 40 struct ContextMenuParams; |
| 40 struct FileChooserParams; | 41 struct FileChooserParams; |
| 41 struct NativeWebKeyboardEvent; | 42 struct NativeWebKeyboardEvent; |
| 42 struct SSLStatus; | 43 struct SSLStatus; |
| 43 } | 44 } |
| 44 | 45 |
| 45 namespace gfx { | 46 namespace gfx { |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 // Returns true if the context menu operation was handled by the delegate. | 233 // Returns true if the context menu operation was handled by the delegate. |
| 233 virtual bool HandleContextMenu(const content::ContextMenuParams& params); | 234 virtual bool HandleContextMenu(const content::ContextMenuParams& params); |
| 234 | 235 |
| 235 // Opens source view for given WebContents that is navigated to the given | 236 // Opens source view for given WebContents that is navigated to the given |
| 236 // page url. | 237 // page url. |
| 237 virtual void ViewSourceForTab(WebContents* source, const GURL& page_url); | 238 virtual void ViewSourceForTab(WebContents* source, const GURL& page_url); |
| 238 | 239 |
| 239 // Opens source view for the given subframe. | 240 // Opens source view for the given subframe. |
| 240 virtual void ViewSourceForFrame(WebContents* source, | 241 virtual void ViewSourceForFrame(WebContents* source, |
| 241 const GURL& url, | 242 const GURL& url, |
| 242 const std::string& content_state); | 243 const PageState& page_state); |
| 243 | 244 |
| 244 // Allows delegates to handle keyboard events before sending to the renderer. | 245 // Allows delegates to handle keyboard events before sending to the renderer. |
| 245 // Returns true if the |event| was handled. Otherwise, if the |event| would be | 246 // Returns true if the |event| was handled. Otherwise, if the |event| would be |
| 246 // handled in HandleKeyboardEvent() method as a normal keyboard shortcut, | 247 // handled in HandleKeyboardEvent() method as a normal keyboard shortcut, |
| 247 // |*is_keyboard_shortcut| should be set to true. | 248 // |*is_keyboard_shortcut| should be set to true. |
| 248 virtual bool PreHandleKeyboardEvent(WebContents* source, | 249 virtual bool PreHandleKeyboardEvent(WebContents* source, |
| 249 const NativeWebKeyboardEvent& event, | 250 const NativeWebKeyboardEvent& event, |
| 250 bool* is_keyboard_shortcut); | 251 bool* is_keyboard_shortcut); |
| 251 | 252 |
| 252 // Allows delegates to handle unhandled keyboard messages coming back from | 253 // Allows delegates to handle unhandled keyboard messages coming back from |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 // Called when |this| is no longer the WebContentsDelegate for |source|. | 429 // Called when |this| is no longer the WebContentsDelegate for |source|. |
| 429 void Detach(WebContents* source); | 430 void Detach(WebContents* source); |
| 430 | 431 |
| 431 // The WebContents that this is currently a delegate for. | 432 // The WebContents that this is currently a delegate for. |
| 432 std::set<WebContents*> attached_contents_; | 433 std::set<WebContents*> attached_contents_; |
| 433 }; | 434 }; |
| 434 | 435 |
| 435 } // namespace content | 436 } // namespace content |
| 436 | 437 |
| 437 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 438 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |