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

Side by Side Diff: chrome/browser/task_manager.cc

Issue 10896: Re-do the way browser windows are shown:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/task_manager.h" 5 #include "chrome/browser/task_manager.h"
6 6
7 #include "base/process_util.h" 7 #include "base/process_util.h"
8 #include "base/stats_table.h" 8 #include "base/stats_table.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "chrome/app/theme/theme_resources.h" 10 #include "chrome/app/theme/theme_resources.h"
(...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after
1055 } 1055 }
1056 1056
1057 bool TaskManager::HasAlwaysOnTopMenu() const { 1057 bool TaskManager::HasAlwaysOnTopMenu() const {
1058 return true; 1058 return true;
1059 }; 1059 };
1060 1060
1061 std::wstring TaskManager::GetWindowTitle() const { 1061 std::wstring TaskManager::GetWindowTitle() const {
1062 return l10n_util::GetString(IDS_TASK_MANAGER_TITLE); 1062 return l10n_util::GetString(IDS_TASK_MANAGER_TITLE);
1063 } 1063 }
1064 1064
1065 void TaskManager::SaveWindowPosition(const CRect& bounds, 1065 std::wstring TaskManager::GetWindowName() const {
1066 bool maximized, 1066 return prefs::kTaskManagerWindowPlacement;
1067 bool always_on_top) {
1068 window()->SaveWindowPositionToPrefService(g_browser_process->local_state(),
1069 prefs::kTaskManagerWindowPlacement,
1070 bounds, maximized, always_on_top);
1071 }
1072
1073 bool TaskManager::RestoreWindowPosition(CRect* bounds,
1074 bool* maximized,
1075 bool* always_on_top) {
1076 return window()->RestoreWindowPositionFromPrefService(
1077 g_browser_process->local_state(),
1078 prefs::kTaskManagerWindowPlacement,
1079 bounds, maximized, always_on_top);
1080 } 1067 }
1081 1068
1082 int TaskManager::GetDialogButtons() const { 1069 int TaskManager::GetDialogButtons() const {
1083 return DIALOGBUTTON_NONE; 1070 return DIALOGBUTTON_NONE;
1084 } 1071 }
1085 1072
1086 void TaskManager::WindowClosing() { 1073 void TaskManager::WindowClosing() {
1087 // Remove the view from its parent to trigger the contents' 1074 // Remove the view from its parent to trigger the contents'
1088 // ViewHierarchyChanged notification to unhook the extra buttons from the 1075 // ViewHierarchyChanged notification to unhook the extra buttons from the
1089 // non-client view. 1076 // non-client view.
1090 contents_->GetParent()->RemoveChildView(contents_.get()); 1077 contents_->GetParent()->RemoveChildView(contents_.get());
1091 Close(); 1078 Close();
1092 1079
1093 ReleaseWindow(); 1080 ReleaseWindow();
1094 } 1081 }
1095 1082
1096 views::View* TaskManager::GetContentsView() { 1083 views::View* TaskManager::GetContentsView() {
1097 return contents_.get(); 1084 return contents_.get();
1098 } 1085 }
1099 1086
1100 // static 1087 // static
1101 TaskManager* TaskManager::GetInstance() { 1088 TaskManager* TaskManager::GetInstance() {
1102 return Singleton<TaskManager>::get(); 1089 return Singleton<TaskManager>::get();
1103 } 1090 }
1104 1091
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698