| 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 #include "chrome/browser/ui/webui/html_dialog_ui.h" | 5 #include "chrome/browser/ui/webui/html_dialog_ui.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/property_bag.h" | 10 #include "base/property_bag.h" |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 // Non-file based UI needs to not have access to the Web UI bindings | 97 // Non-file based UI needs to not have access to the Web UI bindings |
| 98 // for security reasons. The code hosting the dialog should provide | 98 // for security reasons. The code hosting the dialog should provide |
| 99 // dialog specific functionality through other bindings and methods | 99 // dialog specific functionality through other bindings and methods |
| 100 // that are scoped in duration to the dialogs existence. | 100 // that are scoped in duration to the dialogs existence. |
| 101 web_ui->SetBindings(web_ui->GetBindings() & ~content::BINDINGS_POLICY_WEB_UI); | 101 web_ui->SetBindings(web_ui->GetBindings() & ~content::BINDINGS_POLICY_WEB_UI); |
| 102 } | 102 } |
| 103 | 103 |
| 104 ExternalHtmlDialogUI::~ExternalHtmlDialogUI() { | 104 ExternalHtmlDialogUI::~ExternalHtmlDialogUI() { |
| 105 } | 105 } |
| 106 | 106 |
| 107 std::string HtmlDialogUIDelegate::GetDialogName() const { |
| 108 return std::string(); |
| 109 } |
| 110 |
| 111 void HtmlDialogUIDelegate::GetMinimumDialogSize(gfx::Size* size) const { |
| 112 GetDialogSize(size); |
| 113 } |
| 114 |
| 107 bool HtmlDialogUIDelegate::HandleContextMenu( | 115 bool HtmlDialogUIDelegate::HandleContextMenu( |
| 108 const content::ContextMenuParams& params) { | 116 const content::ContextMenuParams& params) { |
| 109 return false; | 117 return false; |
| 110 } | 118 } |
| 111 | 119 |
| 112 bool HtmlDialogUIDelegate::HandleOpenURLFromTab( | 120 bool HtmlDialogUIDelegate::HandleOpenURLFromTab( |
| 113 content::WebContents* source, | 121 content::WebContents* source, |
| 114 const content::OpenURLParams& params, | 122 const content::OpenURLParams& params, |
| 115 content::WebContents** out_new_contents) { | 123 content::WebContents** out_new_contents) { |
| 116 return false; | 124 return false; |
| 117 } | 125 } |
| 118 | 126 |
| 119 bool HtmlDialogUIDelegate::HandleAddNewContents( | 127 bool HtmlDialogUIDelegate::HandleAddNewContents( |
| 120 content::WebContents* source, | 128 content::WebContents* source, |
| 121 content::WebContents* new_contents, | 129 content::WebContents* new_contents, |
| 122 WindowOpenDisposition disposition, | 130 WindowOpenDisposition disposition, |
| 123 const gfx::Rect& initial_pos, | 131 const gfx::Rect& initial_pos, |
| 124 bool user_gesture) { | 132 bool user_gesture) { |
| 125 return false; | 133 return false; |
| 126 } | 134 } |
| OLD | NEW |