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

Side by Side Diff: chrome/browser/ui/libgtk2ui/gtk2_ui.cc

Issue 1556463003: Mark printing code as basic printing and/or print preview code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 11 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/ui/libgtk2ui/gtk2_ui.h" 5 #include "chrome/browser/ui/libgtk2ui/gtk2_ui.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <pango/pango.h> 8 #include <pango/pango.h>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 17 matching lines...) Expand all
28 #include "chrome/browser/ui/libgtk2ui/gtk2_util.h" 28 #include "chrome/browser/ui/libgtk2ui/gtk2_util.h"
29 #include "chrome/browser/ui/libgtk2ui/native_theme_gtk2.h" 29 #include "chrome/browser/ui/libgtk2ui/native_theme_gtk2.h"
30 #include "chrome/browser/ui/libgtk2ui/print_dialog_gtk2.h" 30 #include "chrome/browser/ui/libgtk2ui/print_dialog_gtk2.h"
31 #include "chrome/browser/ui/libgtk2ui/printing_gtk2_util.h" 31 #include "chrome/browser/ui/libgtk2ui/printing_gtk2_util.h"
32 #include "chrome/browser/ui/libgtk2ui/select_file_dialog_impl.h" 32 #include "chrome/browser/ui/libgtk2ui/select_file_dialog_impl.h"
33 #include "chrome/browser/ui/libgtk2ui/skia_utils_gtk2.h" 33 #include "chrome/browser/ui/libgtk2ui/skia_utils_gtk2.h"
34 #include "chrome/browser/ui/libgtk2ui/unity_service.h" 34 #include "chrome/browser/ui/libgtk2ui/unity_service.h"
35 #include "chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.h" 35 #include "chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.h"
36 #include "grit/components_scaled_resources.h" 36 #include "grit/components_scaled_resources.h"
37 #include "grit/theme_resources.h" 37 #include "grit/theme_resources.h"
38 #include "printing/printing_context_linux.h"
39 #include "third_party/skia/include/core/SkBitmap.h" 38 #include "third_party/skia/include/core/SkBitmap.h"
40 #include "third_party/skia/include/core/SkCanvas.h" 39 #include "third_party/skia/include/core/SkCanvas.h"
41 #include "third_party/skia/include/core/SkColor.h" 40 #include "third_party/skia/include/core/SkColor.h"
42 #include "third_party/skia/include/core/SkShader.h" 41 #include "third_party/skia/include/core/SkShader.h"
43 #include "ui/base/resource/resource_bundle.h" 42 #include "ui/base/resource/resource_bundle.h"
44 #include "ui/gfx/canvas.h" 43 #include "ui/gfx/canvas.h"
45 #include "ui/gfx/display.h" 44 #include "ui/gfx/display.h"
46 #include "ui/gfx/geometry/rect.h" 45 #include "ui/gfx/geometry/rect.h"
47 #include "ui/gfx/geometry/size.h" 46 #include "ui/gfx/geometry/size.h"
48 #include "ui/gfx/image/image.h" 47 #include "ui/gfx/image/image.h"
49 #include "ui/gfx/image/image_skia_source.h" 48 #include "ui/gfx/image/image_skia_source.h"
50 #include "ui/gfx/skbitmap_operations.h" 49 #include "ui/gfx/skbitmap_operations.h"
51 #include "ui/gfx/skia_util.h" 50 #include "ui/gfx/skia_util.h"
52 #include "ui/native_theme/native_theme.h" 51 #include "ui/native_theme/native_theme.h"
53 #include "ui/resources/grit/ui_resources.h" 52 #include "ui/resources/grit/ui_resources.h"
54 #include "ui/views/controls/button/blue_button.h" 53 #include "ui/views/controls/button/blue_button.h"
55 #include "ui/views/controls/button/label_button.h" 54 #include "ui/views/controls/button/label_button.h"
56 #include "ui/views/controls/button/label_button_border.h" 55 #include "ui/views/controls/button/label_button_border.h"
57 #include "ui/views/linux_ui/window_button_order_observer.h" 56 #include "ui/views/linux_ui/window_button_order_observer.h"
58 #include "ui/views/resources/grit/views_resources.h" 57 #include "ui/views/resources/grit/views_resources.h"
59 58
59 #if defined(ENABLE_BASIC_PRINTING)
60 #include "printing/printing_context_linux.h"
61 #endif
60 #if defined(USE_GCONF) 62 #if defined(USE_GCONF)
61 #include "chrome/browser/ui/libgtk2ui/gconf_listener.h" 63 #include "chrome/browser/ui/libgtk2ui/gconf_listener.h"
62 #endif 64 #endif
63 65
64 // A minimized port of GtkThemeService into something that can provide colors 66 // A minimized port of GtkThemeService into something that can provide colors
65 // and images for aura. 67 // and images for aura.
66 // 68 //
67 // TODO(erg): There's still a lot that needs ported or done for the first time: 69 // TODO(erg): There's still a lot that needs ported or done for the first time:
68 // 70 //
69 // - Render and inject the omnibox background. 71 // - Render and inject the omnibox background.
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 G_CALLBACK(OnThemeChanged), 486 G_CALLBACK(OnThemeChanged),
485 this); 487 this);
486 g_signal_connect_after(settings, 488 g_signal_connect_after(settings,
487 "notify::gtk-icon-theme-name", 489 "notify::gtk-icon-theme-name",
488 G_CALLBACK(OnThemeChanged), 490 G_CALLBACK(OnThemeChanged),
489 this); 491 this);
490 492
491 493
492 LoadGtkValues(); 494 LoadGtkValues();
493 495
496 #if defined(ENABLE_BASIC_PRINTING)
494 printing::PrintingContextLinux::SetCreatePrintDialogFunction( 497 printing::PrintingContextLinux::SetCreatePrintDialogFunction(
495 &PrintDialogGtk2::CreatePrintDialog); 498 &PrintDialogGtk2::CreatePrintDialog);
496 printing::PrintingContextLinux::SetPdfPaperSizeFunction( 499 printing::PrintingContextLinux::SetPdfPaperSizeFunction(
497 &GetPdfPaperSizeDeviceUnitsGtk); 500 &GetPdfPaperSizeDeviceUnitsGtk);
501 #endif
498 502
499 #if defined(USE_GCONF) 503 #if defined(USE_GCONF)
500 // We must build this after GTK gets initialized. 504 // We must build this after GTK gets initialized.
501 gconf_listener_.reset(new GConfListener(this)); 505 gconf_listener_.reset(new GConfListener(this));
502 #endif // defined(USE_GCONF) 506 #endif // defined(USE_GCONF)
503 507
504 indicators_count = 0; 508 indicators_count = 0;
505 509
506 // Instantiate the singleton instance of Gtk2EventLoop. 510 // Instantiate the singleton instance of Gtk2EventLoop.
507 Gtk2EventLoop::GetInstance(); 511 Gtk2EventLoop::GetInstance();
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
1356 const float rounded = roundf(scale * 10) / 10; 1360 const float rounded = roundf(scale * 10) / 10;
1357 // See crbug.com/484400 1361 // See crbug.com/484400
1358 return rounded < 1.3 ? 1.0 : rounded; 1362 return rounded < 1.3 ? 1.0 : rounded;
1359 } 1363 }
1360 1364
1361 } // namespace libgtk2ui 1365 } // namespace libgtk2ui
1362 1366
1363 views::LinuxUI* BuildGtk2UI() { 1367 views::LinuxUI* BuildGtk2UI() {
1364 return new libgtk2ui::Gtk2UI; 1368 return new libgtk2ui::Gtk2UI;
1365 } 1369 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698