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

Side by Side Diff: views/window/dialog_client_view.cc

Issue 660063: Move skia_utils_gtk.cc/.h to app/gfx/ directory. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: fixes comments Created 10 years, 9 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
« no previous file with comments | « views/controls/textfield/native_textfield_gtk.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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>
11 #else 11 #else
12 #include <gtk/gtk.h> 12 #include <gtk/gtk.h>
13 #endif 13 #endif
14 14
15 #include <algorithm> 15 #include <algorithm>
16 16
17 #include "app/gfx/canvas.h" 17 #include "app/gfx/canvas.h"
18 #include "app/gfx/font.h" 18 #include "app/gfx/font.h"
19 #include "app/gfx/skia_utils_gtk.h"
19 #include "app/l10n_util.h" 20 #include "app/l10n_util.h"
20 #include "app/resource_bundle.h" 21 #include "app/resource_bundle.h"
21 #include "base/keyboard_codes.h" 22 #include "base/keyboard_codes.h"
22 #include "grit/app_strings.h" 23 #include "grit/app_strings.h"
23 #include "skia/ext/skia_utils_gtk.h"
24 #include "views/controls/button/native_button.h" 24 #include "views/controls/button/native_button.h"
25 #include "views/standard_layout.h" 25 #include "views/standard_layout.h"
26 #include "views/window/dialog_delegate.h" 26 #include "views/window/dialog_delegate.h"
27 #include "views/window/window.h" 27 #include "views/window/window.h"
28 #if defined(OS_WIN) 28 #if defined(OS_WIN)
29 #include "app/gfx/native_theme_win.h" 29 #include "app/gfx/native_theme_win.h"
30 #else 30 #else
31 #include "views/window/hit_test.h" 31 #include "views/window/hit_test.h"
32 #include "views/widget/widget.h" 32 #include "views/widget/widget.h"
33 #endif 33 #endif
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 //////////////////////////////////////////////////////////////////////////////// 293 ////////////////////////////////////////////////////////////////////////////////
294 // DialogClientView, View overrides: 294 // DialogClientView, View overrides:
295 295
296 void DialogClientView::Paint(gfx::Canvas* canvas) { 296 void DialogClientView::Paint(gfx::Canvas* canvas) {
297 #if defined(OS_WIN) 297 #if defined(OS_WIN)
298 FillViewWithSysColor(canvas, this, GetSysColor(COLOR_3DFACE)); 298 FillViewWithSysColor(canvas, this, GetSysColor(COLOR_3DFACE));
299 #else 299 #else
300 GtkWidget* widget = GetWidget()->GetNativeView(); 300 GtkWidget* widget = GetWidget()->GetNativeView();
301 if (GTK_IS_WINDOW(widget)) { 301 if (GTK_IS_WINDOW(widget)) {
302 GtkStyle* window_style = gtk_widget_get_style(widget); 302 GtkStyle* window_style = gtk_widget_get_style(widget);
303 canvas->FillRectInt(skia::GdkColorToSkColor( 303 canvas->FillRectInt(gfx::GdkColorToSkColor(
304 window_style->bg[GTK_STATE_NORMAL]), 304 window_style->bg[GTK_STATE_NORMAL]),
305 0, 0, width(), height()); 305 0, 0, width(), height());
306 } 306 }
307 #endif 307 #endif
308 } 308 }
309 309
310 void DialogClientView::PaintChildren(gfx::Canvas* canvas) { 310 void DialogClientView::PaintChildren(gfx::Canvas* canvas) {
311 View::PaintChildren(canvas); 311 View::PaintChildren(canvas);
312 if (!window()->IsMaximized() && !window()->IsMinimized()) 312 if (!window()->IsMaximized() && !window()->IsMinimized())
313 PaintSizeBox(canvas); 313 PaintSizeBox(canvas);
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 void DialogClientView::InitClass() { 561 void DialogClientView::InitClass() {
562 static bool initialized = false; 562 static bool initialized = false;
563 if (!initialized) { 563 if (!initialized) {
564 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 564 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
565 dialog_button_font_ = new gfx::Font(rb.GetFont(ResourceBundle::BaseFont)); 565 dialog_button_font_ = new gfx::Font(rb.GetFont(ResourceBundle::BaseFont));
566 initialized = true; 566 initialized = true;
567 } 567 }
568 } 568 }
569 569
570 } // namespace views 570 } // namespace views
OLDNEW
« no previous file with comments | « views/controls/textfield/native_textfield_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698