| 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 "ui/web_dialogs/web_dialog_ui.h" | 5 #include "ui/web_dialogs/web_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/values.h" | 10 #include "base/values.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 namespace ui { | 21 namespace ui { |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 const char kWebDialogDelegateUserDataKey[] = "WebDialogDelegateUserData"; | 25 const char kWebDialogDelegateUserDataKey[] = "WebDialogDelegateUserData"; |
| 26 | 26 |
| 27 class WebDialogDelegateUserData : public base::SupportsUserData::Data { | 27 class WebDialogDelegateUserData : public base::SupportsUserData::Data { |
| 28 public: | 28 public: |
| 29 explicit WebDialogDelegateUserData(WebDialogDelegate* delegate) | 29 explicit WebDialogDelegateUserData(WebDialogDelegate* delegate) |
| 30 : delegate_(delegate) {} | 30 : delegate_(delegate) {} |
| 31 virtual ~WebDialogDelegateUserData() {} | 31 ~WebDialogDelegateUserData() override {} |
| 32 WebDialogDelegate* delegate() { return delegate_; } | 32 WebDialogDelegate* delegate() { return delegate_; } |
| 33 | 33 |
| 34 private: | 34 private: |
| 35 WebDialogDelegate* delegate_; // unowned | 35 WebDialogDelegate* delegate_; // unowned |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 } // namespace | 38 } // namespace |
| 39 | 39 |
| 40 WebDialogUI::WebDialogUI(content::WebUI* web_ui) | 40 WebDialogUI::WebDialogUI(content::WebUI* web_ui) |
| 41 : WebUIController(web_ui) { | 41 : WebUIController(web_ui) { |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 // for security reasons. The code hosting the dialog should provide | 119 // for security reasons. The code hosting the dialog should provide |
| 120 // dialog specific functionality through other bindings and methods | 120 // dialog specific functionality through other bindings and methods |
| 121 // that are scoped in duration to the dialogs existence. | 121 // that are scoped in duration to the dialogs existence. |
| 122 web_ui->SetBindings(web_ui->GetBindings() & ~content::BINDINGS_POLICY_WEB_UI); | 122 web_ui->SetBindings(web_ui->GetBindings() & ~content::BINDINGS_POLICY_WEB_UI); |
| 123 } | 123 } |
| 124 | 124 |
| 125 ExternalWebDialogUI::~ExternalWebDialogUI() { | 125 ExternalWebDialogUI::~ExternalWebDialogUI() { |
| 126 } | 126 } |
| 127 | 127 |
| 128 } // namespace ui | 128 } // namespace ui |
| OLD | NEW |