| 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/tab_modal_confirm_dialog_webui.h" | 5 #include "chrome/browser/ui/webui/tab_modal_confirm_dialog_webui.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 TabModalConfirmDialogWebUI::TabModalConfirmDialogWebUI( | 44 TabModalConfirmDialogWebUI::TabModalConfirmDialogWebUI( |
| 45 TabModalConfirmDialogDelegate* delegate, | 45 TabModalConfirmDialogDelegate* delegate, |
| 46 WebContents* web_contents) | 46 WebContents* web_contents) |
| 47 : delegate_(delegate) { | 47 : delegate_(delegate) { |
| 48 Profile* profile = | 48 Profile* profile = |
| 49 Profile::FromBrowserContext(web_contents->GetBrowserContext()); | 49 Profile::FromBrowserContext(web_contents->GetBrowserContext()); |
| 50 ChromeWebUIDataSource* data_source = | 50 ChromeWebUIDataSource* data_source = |
| 51 new ChromeWebUIDataSource(chrome::kChromeUITabModalConfirmDialogHost); | 51 new ChromeWebUIDataSource(chrome::kChromeUITabModalConfirmDialogHost); |
| 52 data_source->set_default_resource(IDR_TAB_MODAL_CONFIRM_DIALOG_HTML); | 52 data_source->set_default_resource(IDR_TAB_MODAL_CONFIRM_DIALOG_HTML); |
| 53 ChromeURLDataManager::AddDataSource(profile, data_source); | 53 ChromeURLDataManager::AddDataSourceImpl(profile, data_source); |
| 54 | 54 |
| 55 constrained_web_dialog_delegate_ = | 55 constrained_web_dialog_delegate_ = |
| 56 CreateConstrainedWebDialog(profile, this, NULL, web_contents); | 56 CreateConstrainedWebDialog(profile, this, NULL, web_contents); |
| 57 delegate_->set_window(constrained_web_dialog_delegate_->GetWindow()); | 57 delegate_->set_window(constrained_web_dialog_delegate_->GetWindow()); |
| 58 } | 58 } |
| 59 | 59 |
| 60 ui::ModalType TabModalConfirmDialogWebUI::GetDialogModalType() const { | 60 ui::ModalType TabModalConfirmDialogWebUI::GetDialogModalType() const { |
| 61 return ui::MODAL_TYPE_WINDOW; | 61 return ui::MODAL_TYPE_WINDOW; |
| 62 } | 62 } |
| 63 | 63 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 return true; | 110 return true; |
| 111 } | 111 } |
| 112 | 112 |
| 113 TabModalConfirmDialogWebUI::~TabModalConfirmDialogWebUI() {} | 113 TabModalConfirmDialogWebUI::~TabModalConfirmDialogWebUI() {} |
| 114 | 114 |
| 115 void TabModalConfirmDialogWebUI::AcceptTabModalDialog() { | 115 void TabModalConfirmDialogWebUI::AcceptTabModalDialog() { |
| 116 } | 116 } |
| 117 | 117 |
| 118 void TabModalConfirmDialogWebUI::CancelTabModalDialog() { | 118 void TabModalConfirmDialogWebUI::CancelTabModalDialog() { |
| 119 } | 119 } |
| OLD | NEW |