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

Side by Side Diff: ash/accelerators/exit_warning_handler.cc

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More compile fix for ToT Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ash/accelerators/exit_warning_handler.h" 5 #include "ash/accelerators/exit_warning_handler.h"
6 6
7 #include "ash/metrics/user_metrics_recorder.h" 7 #include "ash/metrics/user_metrics_recorder.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/shell_delegate.h" 9 #include "ash/shell_delegate.h"
10 #include "ash/shell_window_ids.h" 10 #include "ash/shell_window_ids.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 label->SetText(text_); 81 label->SetText(text_);
82 label->SetHorizontalAlignment(gfx::ALIGN_CENTER); 82 label->SetHorizontalAlignment(gfx::ALIGN_CENTER);
83 label->SetFontList(font_list); 83 label->SetFontList(font_list);
84 label->SetEnabledColor(kTextColor); 84 label->SetEnabledColor(kTextColor);
85 label->SetDisabledColor(kTextColor); 85 label->SetDisabledColor(kTextColor);
86 label->SetAutoColorReadabilityEnabled(false); 86 label->SetAutoColorReadabilityEnabled(false);
87 AddChildView(label); 87 AddChildView(label);
88 SetLayoutManager(new views::FillLayout); 88 SetLayoutManager(new views::FillLayout);
89 } 89 }
90 90
91 virtual gfx::Size GetPreferredSize() OVERRIDE { 91 virtual gfx::Size GetPreferredSize() const OVERRIDE {
92 return gfx::Size(width_, height_); 92 return gfx::Size(width_, height_);
93 } 93 }
94 94
95 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE { 95 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
96 SkPaint paint; 96 SkPaint paint;
97 paint.setStyle(SkPaint::kFill_Style); 97 paint.setStyle(SkPaint::kFill_Style);
98 paint.setColor(kWindowBackgroundColor); 98 paint.setColor(kWindowBackgroundColor);
99 canvas->DrawRoundRect(GetLocalBounds(), kWindowCornerRadius, paint); 99 canvas->DrawRoundRect(GetLocalBounds(), kWindowCornerRadius, paint);
100 views::WidgetDelegateView::OnPaint(canvas); 100 views::WidgetDelegateView::OnPaint(canvas);
101 } 101 }
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 widget_->Show(); 200 widget_->Show();
201 201
202 delegate->NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); 202 delegate->NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true);
203 } 203 }
204 204
205 void ExitWarningHandler::Hide() { 205 void ExitWarningHandler::Hide() {
206 widget_.reset(); 206 widget_.reset();
207 } 207 }
208 208
209 } // namespace ash 209 } // namespace ash
OLDNEW
« no previous file with comments | « apps/ui/views/native_app_window_views.cc ('k') | ash/frame/caption_buttons/frame_caption_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698