Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: chrome/browser/ui/webui/tab_modal_confirm_dialog_webui.cc

Issue 10448066: Move the web dialogs code to src/ui/web_dialogs from src/chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
11 #include "base/json/json_reader.h" 11 #include "base/json/json_reader.h"
12 #include "base/json/json_writer.h" 12 #include "base/json/json_writer.h"
13 #include "base/string_piece.h" 13 #include "base/string_piece.h"
14 #include "base/utf_string_conversions.h" 14 #include "base/utf_string_conversions.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
17 #include "chrome/browser/ui/browser_dialogs.h" 17 #include "chrome/browser/ui/browser_dialogs.h"
18 #include "chrome/browser/ui/constrained_window.h" 18 #include "chrome/browser/ui/constrained_window.h"
19 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 19 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
20 #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h" 20 #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h"
21 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" 21 #include "chrome/browser/ui/webui/chrome_url_data_manager.h"
22 #include "chrome/browser/ui/webui/chrome_web_ui_data_source.h" 22 #include "chrome/browser/ui/webui/chrome_web_ui_data_source.h"
23 #include "chrome/browser/ui/webui/constrained_web_dialog_ui.h"
24 #include "chrome/common/jstemplate_builder.h" 23 #include "chrome/common/jstemplate_builder.h"
25 #include "chrome/common/url_constants.h" 24 #include "chrome/common/url_constants.h"
26 #include "grit/browser_resources.h" 25 #include "grit/browser_resources.h"
27 #include "grit/generated_resources.h" 26 #include "grit/generated_resources.h"
28 #include "ui/base/l10n/l10n_util.h" 27 #include "ui/base/l10n/l10n_util.h"
29 #include "ui/base/resource/resource_bundle.h" 28 #include "ui/base/resource/resource_bundle.h"
30 #include "ui/gfx/size.h" 29 #include "ui/gfx/size.h"
30 #include "ui/web_dialogs/constrained_web_dialog_ui.h"
31 31
32 using content::WebContents; 32 using content::WebContents;
33 using content::WebUIMessageHandler; 33 using content::WebUIMessageHandler;
34 using ui::ConstrainedWebDialogUI;
34 35
35 namespace browser { 36 namespace browser {
36 37
37 // Declared in browser_dialogs.h so others don't have to depend on our header. 38 // Declared in browser_dialogs.h so others don't have to depend on our header.
38 void ShowTabModalConfirmDialog(TabModalConfirmDialogDelegate* delegate, 39 void ShowTabModalConfirmDialog(TabModalConfirmDialogDelegate* delegate,
39 TabContentsWrapper* wrapper) { 40 TabContentsWrapper* wrapper) {
40 new TabModalConfirmDialogWebUI(delegate, wrapper); 41 new TabModalConfirmDialogWebUI(delegate, wrapper);
41 } 42 }
42 43
43 } // namespace browser 44 } // namespace browser
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 delegate_->Cancel(); 112 delegate_->Cancel();
112 delete this; 113 delete this;
113 } 114 }
114 115
115 void TabModalConfirmDialogWebUI::OnCloseContents(WebContents* source, 116 void TabModalConfirmDialogWebUI::OnCloseContents(WebContents* source,
116 bool* out_close_dialog) {} 117 bool* out_close_dialog) {}
117 118
118 bool TabModalConfirmDialogWebUI::ShouldShowDialogTitle() const { 119 bool TabModalConfirmDialogWebUI::ShouldShowDialogTitle() const {
119 return true; 120 return true;
120 } 121 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698