| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 // Non-file based UI needs to not have access to the Web UI bindings | 96 // Non-file based UI needs to not have access to the Web UI bindings |
| 97 // for security reasons. The code hosting the dialog should provide | 97 // for security reasons. The code hosting the dialog should provide |
| 98 // dialog specific functionality through other bindings and methods | 98 // dialog specific functionality through other bindings and methods |
| 99 // that are scoped in duration to the dialogs existence. | 99 // that are scoped in duration to the dialogs existence. |
| 100 web_ui->SetBindings(web_ui->GetBindings() & ~content::BINDINGS_POLICY_WEB_UI); | 100 web_ui->SetBindings(web_ui->GetBindings() & ~content::BINDINGS_POLICY_WEB_UI); |
| 101 } | 101 } |
| 102 | 102 |
| 103 ExternalHtmlDialogUI::~ExternalHtmlDialogUI() { | 103 ExternalHtmlDialogUI::~ExternalHtmlDialogUI() { |
| 104 } | 104 } |
| 105 | 105 |
| 106 bool HtmlDialogUIDelegate::HandleContextMenu(const ContextMenuParams& params) { | 106 bool HtmlDialogUIDelegate::HandleContextMenu( |
| 107 const content::ContextMenuParams& params) { |
| 107 return false; | 108 return false; |
| 108 } | 109 } |
| 109 | 110 |
| 110 bool HtmlDialogUIDelegate::HandleOpenURLFromTab( | 111 bool HtmlDialogUIDelegate::HandleOpenURLFromTab( |
| 111 content::WebContents* source, | 112 content::WebContents* source, |
| 112 const content::OpenURLParams& params, | 113 const content::OpenURLParams& params, |
| 113 content::WebContents** out_new_contents) { | 114 content::WebContents** out_new_contents) { |
| 114 return false; | 115 return false; |
| 115 } | 116 } |
| 116 | 117 |
| 117 bool HtmlDialogUIDelegate::HandleAddNewContents( | 118 bool HtmlDialogUIDelegate::HandleAddNewContents( |
| 118 content::WebContents* source, | 119 content::WebContents* source, |
| 119 content::WebContents* new_contents, | 120 content::WebContents* new_contents, |
| 120 WindowOpenDisposition disposition, | 121 WindowOpenDisposition disposition, |
| 121 const gfx::Rect& initial_pos, | 122 const gfx::Rect& initial_pos, |
| 122 bool user_gesture) { | 123 bool user_gesture) { |
| 123 return false; | 124 return false; |
| 124 } | 125 } |
| OLD | NEW |