| Index: chrome/browser/ui/cocoa/html_dialog_window_controller.mm
|
| diff --git a/chrome/browser/ui/cocoa/html_dialog_window_controller.mm b/chrome/browser/ui/cocoa/html_dialog_window_controller.mm
|
| index f57af531529ade0ebf872533d34060bd248e750f..6fd7a1d4c9ef6478930195d04fd31725e9edcfc1 100644
|
| --- a/chrome/browser/ui/cocoa/html_dialog_window_controller.mm
|
| +++ b/chrome/browser/ui/cocoa/html_dialog_window_controller.mm
|
| @@ -61,6 +61,14 @@ public:
|
| virtual void MoveContents(WebContents* source, const gfx::Rect& pos);
|
| virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event);
|
| virtual void CloseContents(WebContents* source) OVERRIDE;
|
| + virtual content::WebContents* OpenURLFromTab(
|
| + content::WebContents* source,
|
| + const content::OpenURLParams& params) OVERRIDE;
|
| + virtual void AddNewContents(content::WebContents* source,
|
| + content::WebContents* new_contents,
|
| + WindowOpenDisposition disposition,
|
| + const gfx::Rect& initial_pos,
|
| + bool user_gesture) OVERRIDE;
|
|
|
| private:
|
| HtmlDialogWindowController* controller_; // weak
|
| @@ -97,6 +105,10 @@ gfx::NativeWindow ShowHtmlDialog(gfx::NativeWindow parent,
|
| browser:browser];
|
| }
|
|
|
| +void CloseHtmlDialog(gfx::NativeWindow window) {
|
| + [window performClose:nil];
|
| +}
|
| +
|
| } // namespace html_dialog_window_controller
|
|
|
| HtmlDialogWindowDelegateBridge::HtmlDialogWindowDelegateBridge(
|
| @@ -200,6 +212,31 @@ void HtmlDialogWindowDelegateBridge::CloseContents(WebContents* source) {
|
| OnDialogClosed(std::string());
|
| }
|
|
|
| +content::WebContents* HtmlDialogWindowDelegateBridge::OpenURLFromTab(
|
| + content::WebContents* source,
|
| + const content::OpenURLParams& params) {
|
| + content::WebContents* new_contents = NULL;
|
| + if (delegate_ &&
|
| + delegate_->HandleOpenURLFromTab(source, params, &new_contents)) {
|
| + return new_contents;
|
| + }
|
| + return HtmlDialogTabContentsDelegate::OpenURLFromTab(source, params);
|
| +}
|
| +
|
| +void HtmlDialogWindowDelegateBridge::AddNewContents(
|
| + content::WebContents* source,
|
| + content::WebContents* new_contents,
|
| + WindowOpenDisposition disposition,
|
| + const gfx::Rect& initial_pos,
|
| + bool user_gesture) {
|
| + if (delegate_ && delegate_->HandleAddNewContents(
|
| + source, new_contents, disposition, initial_pos, user_gesture)) {
|
| + return;
|
| + }
|
| + HtmlDialogTabContentsDelegate::AddNewContents(
|
| + source, new_contents, disposition, initial_pos, user_gesture);
|
| +}
|
| +
|
| void HtmlDialogWindowDelegateBridge::MoveContents(WebContents* source,
|
| const gfx::Rect& pos) {
|
| // TODO(akalin): Actually set the window bounds.
|
|
|