Chromium Code Reviews| 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 void HtmlDialogUIDelegate::GetMinimumDialogSize(gfx::Size* size) const { | |
| 107 GetDialogSize(size); | |
| 108 } | |
| 109 | |
| 106 bool HtmlDialogUIDelegate::HandleContextMenu( | 110 bool HtmlDialogUIDelegate::HandleContextMenu( |
| 107 const content::ContextMenuParams& params) { | 111 const content::ContextMenuParams& params) { |
| 108 return false; | 112 return false; |
| 109 } | 113 } |
| 110 | 114 |
| 115 std::string HtmlDialogUIDelegate::GetDialogName() const { | |
|
James Hawkins
2012/03/15 16:34:36
Ordering still doesn't match the header.
yoshiki
2012/03/16 05:55:10
Sorry, I took a mistake. I've fixed.
On 2012/03/1
| |
| 116 return std::string(); | |
| 117 } | |
| 118 | |
| 111 bool HtmlDialogUIDelegate::HandleOpenURLFromTab( | 119 bool HtmlDialogUIDelegate::HandleOpenURLFromTab( |
| 112 content::WebContents* source, | 120 content::WebContents* source, |
| 113 const content::OpenURLParams& params, | 121 const content::OpenURLParams& params, |
| 114 content::WebContents** out_new_contents) { | 122 content::WebContents** out_new_contents) { |
| 115 return false; | 123 return false; |
| 116 } | 124 } |
| 117 | 125 |
| 118 bool HtmlDialogUIDelegate::HandleAddNewContents( | 126 bool HtmlDialogUIDelegate::HandleAddNewContents( |
| 119 content::WebContents* source, | 127 content::WebContents* source, |
| 120 content::WebContents* new_contents, | 128 content::WebContents* new_contents, |
| 121 WindowOpenDisposition disposition, | 129 WindowOpenDisposition disposition, |
| 122 const gfx::Rect& initial_pos, | 130 const gfx::Rect& initial_pos, |
| 123 bool user_gesture) { | 131 bool user_gesture) { |
| 124 return false; | 132 return false; |
| 125 } | 133 } |
| OLD | NEW |