| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #include "chrome/common/jstemplate_builder.h" | 23 #include "chrome/common/jstemplate_builder.h" |
| 24 #include "chrome/common/url_constants.h" | 24 #include "chrome/common/url_constants.h" |
| 25 #include "content/browser/tab_contents/tab_contents.h" | 25 #include "content/browser/tab_contents/tab_contents.h" |
| 26 #include "grit/browser_resources.h" | 26 #include "grit/browser_resources.h" |
| 27 #include "grit/generated_resources.h" | 27 #include "grit/generated_resources.h" |
| 28 #include "ui/base/l10n/l10n_util.h" | 28 #include "ui/base/l10n/l10n_util.h" |
| 29 #include "ui/base/resource/resource_bundle.h" | 29 #include "ui/base/resource/resource_bundle.h" |
| 30 #include "ui/gfx/size.h" | 30 #include "ui/gfx/size.h" |
| 31 | 31 |
| 32 using content::WebContents; | 32 using content::WebContents; |
| 33 using content::WebUIMessageHandler; |
| 33 | 34 |
| 34 namespace browser { | 35 namespace browser { |
| 35 | 36 |
| 36 // Declared in browser_dialogs.h so others don't have to depend on our header. | 37 // Declared in browser_dialogs.h so others don't have to depend on our header. |
| 37 void ShowTabModalConfirmDialog(TabModalConfirmDialogDelegate* delegate, | 38 void ShowTabModalConfirmDialog(TabModalConfirmDialogDelegate* delegate, |
| 38 TabContentsWrapper* wrapper) { | 39 TabContentsWrapper* wrapper) { |
| 39 new TabModalConfirmDialogUI(delegate, wrapper); | 40 new TabModalConfirmDialogUI(delegate, wrapper); |
| 40 } | 41 } |
| 41 | 42 |
| 42 } // namespace browser | 43 } // namespace browser |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 | 134 |
| 134 TabModalConfirmDialogUI::~TabModalConfirmDialogUI() {} | 135 TabModalConfirmDialogUI::~TabModalConfirmDialogUI() {} |
| 135 | 136 |
| 136 void TabModalConfirmDialogUI::OnDialogClosed(bool accepted) { | 137 void TabModalConfirmDialogUI::OnDialogClosed(bool accepted) { |
| 137 delegate_->set_window(NULL); | 138 delegate_->set_window(NULL); |
| 138 if (accepted) | 139 if (accepted) |
| 139 delegate_->Accept(); | 140 delegate_->Accept(); |
| 140 else | 141 else |
| 141 delegate_->Cancel(); | 142 delegate_->Cancel(); |
| 142 } | 143 } |
| OLD | NEW |