Index: chrome/browser/ui/webui/html_dialog_ui.h |
diff --git a/chrome/browser/ui/webui/html_dialog_ui.h b/chrome/browser/ui/webui/html_dialog_ui.h |
index 4399a96e2a3e74051def237cccadfb7dc008bea6..751c1f7da05bb848ca62998bc739db092743741b 100644 |
--- a/chrome/browser/ui/webui/html_dialog_ui.h |
+++ b/chrome/browser/ui/webui/html_dialog_ui.h |
@@ -11,6 +11,7 @@ |
#include "base/compiler_specific.h" |
#include "base/string16.h" |
+#include "content/public/browser/web_contents_delegate.h" |
#include "content/public/browser/web_ui_controller.h" |
#include "googleurl/src/gurl.h" |
#include "ui/base/ui_base_types.h" |
@@ -79,6 +80,23 @@ class HtmlDialogUIDelegate { |
// shown (because you want to handle it yourself). |
virtual bool HandleContextMenu(const ContextMenuParams& params); |
+ // A callback to allow the delegate to open a new URL inside |source|. |
+ // On return |out_new_contents| should contain the WebContents the URL |
+ // is opened in. Return false to use the default handler. |
+ virtual bool HandleOpenURLFromTab(content::WebContents* source, |
+ const content::OpenURLParams& params, |
+ content::WebContents** out_new_contents) { |
+ return false; |
+ } |
+ |
+ // A callback to create a new tab with |new_contents|. Return false to use the |
+ // default handler. |
+ virtual bool HandlerAddNewContents(content::WebContents* source, |
+ content::WebContents* new_contents, |
+ WindowOpenDisposition disposition, |
+ const gfx::Rect& initial_pos, |
+ bool user_gesture) { return false; } |
+ |
// Stores the dialog bounds. |
virtual void StoreDialogSize(const gfx::Size& dialog_size) {} |