| 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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 } | 290 } |
| 291 ClientView::WindowClosing(); | 291 ClientView::WindowClosing(); |
| 292 } | 292 } |
| 293 | 293 |
| 294 int DialogClientView::NonClientHitTest(const gfx::Point& point) { | 294 int DialogClientView::NonClientHitTest(const gfx::Point& point) { |
| 295 if (size_box_bounds_.Contains(point.x() - x(), point.y() - y())) | 295 if (size_box_bounds_.Contains(point.x() - x(), point.y() - y())) |
| 296 return HTBOTTOMRIGHT; | 296 return HTBOTTOMRIGHT; |
| 297 return ClientView::NonClientHitTest(point); | 297 return ClientView::NonClientHitTest(point); |
| 298 } | 298 } |
| 299 | 299 |
| 300 DialogClientView* DialogClientView::AsDialogClientView() { |
| 301 return this; |
| 302 } |
| 303 |
| 300 //////////////////////////////////////////////////////////////////////////////// | 304 //////////////////////////////////////////////////////////////////////////////// |
| 301 // DialogClientView, View overrides: | 305 // DialogClientView, View overrides: |
| 302 | 306 |
| 303 void DialogClientView::OnPaint(gfx::Canvas* canvas) { | 307 void DialogClientView::OnPaint(gfx::Canvas* canvas) { |
| 304 #if defined(OS_WIN) | 308 #if defined(OS_WIN) |
| 305 FillViewWithSysColor(canvas, this, GetSysColor(COLOR_3DFACE)); | 309 FillViewWithSysColor(canvas, this, GetSysColor(COLOR_3DFACE)); |
| 306 #else | 310 #else |
| 307 GtkWidget* widget = GetWidget()->GetNativeView(); | 311 GtkWidget* widget = GetWidget()->GetNativeView(); |
| 308 if (GTK_IS_WINDOW(widget)) { | 312 if (GTK_IS_WINDOW(widget)) { |
| 309 GtkStyle* window_style = gtk_widget_get_style(widget); | 313 GtkStyle* window_style = gtk_widget_get_style(widget); |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 void DialogClientView::InitClass() { | 573 void DialogClientView::InitClass() { |
| 570 static bool initialized = false; | 574 static bool initialized = false; |
| 571 if (!initialized) { | 575 if (!initialized) { |
| 572 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 576 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
| 573 dialog_button_font_ = new gfx::Font(rb.GetFont(ResourceBundle::BaseFont)); | 577 dialog_button_font_ = new gfx::Font(rb.GetFont(ResourceBundle::BaseFont)); |
| 574 initialized = true; | 578 initialized = true; |
| 575 } | 579 } |
| 576 } | 580 } |
| 577 | 581 |
| 578 } // namespace views | 582 } // namespace views |
| OLD | NEW |