OLD | NEW |
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 "views/window/dialog_client_view.h" | 5 #include "views/window/dialog_client_view.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <uxtheme.h> | 9 #include <uxtheme.h> |
10 #include <vsstyle.h> | 10 #include <vsstyle.h> |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 const DialogClientView* DialogClientView::AsDialogClientView() const { | 305 const DialogClientView* DialogClientView::AsDialogClientView() const { |
306 return this; | 306 return this; |
307 } | 307 } |
308 | 308 |
309 //////////////////////////////////////////////////////////////////////////////// | 309 //////////////////////////////////////////////////////////////////////////////// |
310 // DialogClientView, View overrides: | 310 // DialogClientView, View overrides: |
311 | 311 |
312 void DialogClientView::OnPaint(gfx::Canvas* canvas) { | 312 void DialogClientView::OnPaint(gfx::Canvas* canvas) { |
313 #if defined(OS_WIN) | 313 #if defined(OS_WIN) |
314 FillViewWithSysColor(canvas, this, GetSysColor(COLOR_3DFACE)); | 314 FillViewWithSysColor(canvas, this, GetSysColor(COLOR_3DFACE)); |
315 #elif defined(USE_WAYLAND) | 315 #elif defined(USE_WAYLAND) || defined(USE_AURA) |
316 SkColor sk_color = SkColorSetARGB(200, 255, 255, 255); | 316 SkColor sk_color = SkColorSetARGB(200, 255, 255, 255); |
317 canvas->FillRectInt(sk_color, 0, 0, width(), height()); | 317 canvas->FillRectInt(sk_color, 0, 0, width(), height()); |
318 #else | 318 #else |
319 GtkWidget* widget = GetWidget()->GetNativeView(); | 319 GtkWidget* widget = GetWidget()->GetNativeView(); |
320 if (GTK_IS_WINDOW(widget)) { | 320 if (GTK_IS_WINDOW(widget)) { |
321 GtkStyle* window_style = gtk_widget_get_style(widget); | 321 GtkStyle* window_style = gtk_widget_get_style(widget); |
322 canvas->FillRectInt(gfx::GdkColorToSkColor( | 322 canvas->FillRectInt(gfx::GdkColorToSkColor( |
323 window_style->bg[GTK_STATE_NORMAL]), | 323 window_style->bg[GTK_STATE_NORMAL]), |
324 0, 0, width(), height()); | 324 0, 0, width(), height()); |
325 } | 325 } |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 void DialogClientView::InitClass() { | 580 void DialogClientView::InitClass() { |
581 static bool initialized = false; | 581 static bool initialized = false; |
582 if (!initialized) { | 582 if (!initialized) { |
583 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 583 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
584 dialog_button_font_ = new gfx::Font(rb.GetFont(ResourceBundle::BaseFont)); | 584 dialog_button_font_ = new gfx::Font(rb.GetFont(ResourceBundle::BaseFont)); |
585 initialized = true; | 585 initialized = true; |
586 } | 586 } |
587 } | 587 } |
588 | 588 |
589 } // namespace views | 589 } // namespace views |
OLD | NEW |