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

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

Issue 7461136: Convert HtmlDialogUIDelegate::GetDialogTitle() to string16. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixes Created 9 years, 4 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
« no previous file with comments | « chrome/browser/ui/webui/html_dialog_ui.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/task_manager_dialog.h" 5 #include "chrome/browser/ui/webui/task_manager_dialog.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_list.h" 10 #include "chrome/browser/ui/browser_list.h"
(...skipping 11 matching lines...) Expand all
22 22
23 void ShowDialog(); 23 void ShowDialog();
24 24
25 protected: 25 protected:
26 friend struct DefaultSingletonTraits<TaskManagerDialogImpl>; 26 friend struct DefaultSingletonTraits<TaskManagerDialogImpl>;
27 virtual ~TaskManagerDialogImpl(); 27 virtual ~TaskManagerDialogImpl();
28 28
29 void OnCloseDialog(); 29 void OnCloseDialog();
30 30
31 // Overridden from HtmlDialogUIDelegate: 31 // Overridden from HtmlDialogUIDelegate:
32 virtual bool IsDialogModal() const { 32 virtual bool IsDialogModal() const OVERRIDE {
33 return false; 33 return false;
34 } 34 }
35 virtual std::wstring GetDialogTitle() const { 35 virtual string16 GetDialogTitle() const OVERRIDE {
36 return UTF16ToWide(l10n_util::GetStringUTF16(IDS_TASK_MANAGER_TITLE)); 36 return l10n_util::GetStringUTF16(IDS_TASK_MANAGER_TITLE);
37 } 37 }
38 virtual GURL GetDialogContentURL() const { 38 virtual GURL GetDialogContentURL() const OVERRIDE {
39 std::string url_string(chrome::kChromeUITaskManagerURL); 39 std::string url_string(chrome::kChromeUITaskManagerURL);
40 return GURL(url_string); 40 return GURL(url_string);
41 } 41 }
42 virtual void GetWebUIMessageHandlers( 42 virtual void GetWebUIMessageHandlers(
43 std::vector<WebUIMessageHandler*>* handlers) const { 43 std::vector<WebUIMessageHandler*>* handlers) const OVERRIDE {
44 } 44 }
45 virtual void GetDialogSize(gfx::Size* size) const { 45 virtual void GetDialogSize(gfx::Size* size) const OVERRIDE {
46 size->SetSize(640, 480); 46 size->SetSize(640, 480);
47 } 47 }
48 virtual std::string GetDialogArgs() const { 48 virtual std::string GetDialogArgs() const OVERRIDE {
49 return std::string(); 49 return std::string();
50 } 50 }
51 virtual void OnDialogClosed(const std::string& json_retval) { 51 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE {
52 OnCloseDialog(); 52 OnCloseDialog();
53 } 53 }
54 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog) { 54 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog)
55 OVERRIDE {
55 *out_close_dialog = true; 56 *out_close_dialog = true;
56 OnCloseDialog(); 57 OnCloseDialog();
57 } 58 }
58 virtual bool ShouldShowDialogTitle() const { 59 virtual bool ShouldShowDialogTitle() const OVERRIDE {
59 return false; 60 return false;
60 } 61 }
61 virtual bool HandleContextMenu(const ContextMenuParams& params) { 62 virtual bool HandleContextMenu(const ContextMenuParams& params) OVERRIDE {
62 return true; 63 return true;
63 } 64 }
64 65
65 private: 66 private:
66 void OpenHtmlDialog(); 67 void OpenHtmlDialog();
67 68
68 bool is_shown_; 69 bool is_shown_;
69 70
70 DISALLOW_COPY_AND_ASSIGN(TaskManagerDialogImpl); 71 DISALLOW_COPY_AND_ASSIGN(TaskManagerDialogImpl);
71 }; 72 };
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 } 105 }
105 106
106 // **************************************************** 107 // ****************************************************
107 // 108 //
108 // static 109 // static
109 void TaskManagerDialog::Show() { 110 void TaskManagerDialog::Show() {
110 TaskManagerDialogImpl* dialog = TaskManagerDialogImpl::GetInstance(); 111 TaskManagerDialogImpl* dialog = TaskManagerDialogImpl::GetInstance();
111 dialog->ShowDialog(); 112 dialog->ShowDialog();
112 } 113 }
113 114
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/html_dialog_ui.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698