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

Unified Diff: chrome/browser/ui/views/task_manager_view.cc

Issue 15731007: Add dialog-specific styling, restore old-style task manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/views/window/dialog_client_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/task_manager_view.cc
diff --git a/chrome/browser/ui/views/task_manager_view.cc b/chrome/browser/ui/views/task_manager_view.cc
index 80e079876cf7f46fce8b607166037b2fb25973ad..1a7f97a6d45e60eb4faaca1d003d0cc3d3acdfbb 100644
--- a/chrome/browser/ui/views/task_manager_view.cc
+++ b/chrome/browser/ui/views/task_manager_view.cc
@@ -227,6 +227,7 @@ class TaskManagerView : public views::ButtonListener,
virtual std::string GetWindowName() const OVERRIDE;
virtual int GetDialogButtons() const OVERRIDE;
virtual void WindowClosing() OVERRIDE;
+ virtual bool UseNewStyleForThisDialog() const OVERRIDE;
// views::TableViewObserver:
virtual void OnSelectionChanged() OVERRIDE;
@@ -493,13 +494,10 @@ void TaskManagerView::ViewHierarchyChanged(
}
void TaskManagerView::Layout() {
- bool new_style = views::DialogDelegate::UseNewStyle();
gfx::Size size = kill_button_->GetPreferredSize();
gfx::Rect parent_bounds = parent()->GetContentsBounds();
- const int horizontal_margin =
- new_style ? views::kButtonHEdgeMarginNew : views::kPanelHorizMargin;
- const int vertical_margin =
- new_style ? views::kButtonVEdgeMarginNew : views::kButtonVEdgeMargin;
+ const int horizontal_margin = views::kPanelHorizMargin;
+ const int vertical_margin = views::kButtonVEdgeMargin;
int x = width() - size.width() - horizontal_margin;
int y_buttons = parent_bounds.bottom() - size.height() - vertical_margin;
kill_button_->SetBounds(x, y_buttons, size.width(), size.height());
@@ -651,6 +649,10 @@ void TaskManagerView::WindowClosing() {
task_manager_->OnWindowClosed();
}
+bool TaskManagerView::UseNewStyleForThisDialog() const {
+ return false;
+}
+
// views::TableViewObserver implementation.
void TaskManagerView::OnSelectionChanged() {
const ui::ListSelectionModel::SelectedIndices& selection(
« no previous file with comments | « no previous file | ui/views/window/dialog_client_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698