| OLD | NEW |
| 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 <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/leak_annotations.h" | 10 #include "base/debug/leak_annotations.h" |
| 11 #include "base/environment.h" | 11 #include "base/environment.h" |
| 12 #include "base/i18n/rtl.h" | 12 #include "base/i18n/rtl.h" |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/nix/mime_util_xdg.h" | 14 #include "base/nix/mime_util_xdg.h" |
| 15 #include "base/stl_util.h" | 15 #include "base/stl_util.h" |
| 16 #include "base/strings/stringprintf.h" | 16 #include "base/strings/stringprintf.h" |
| 17 #include "chrome/browser/themes/theme_properties.h" | 17 #include "chrome/browser/themes/theme_properties.h" |
| 18 #include "chrome/browser/ui/libgtk2ui/app_indicator_icon.h" | 18 #include "chrome/browser/ui/libgtk2ui/app_indicator_icon.h" |
| 19 #include "chrome/browser/ui/libgtk2ui/chrome_gtk_frame.h" | 19 #include "chrome/browser/ui/libgtk2ui/chrome_gtk_frame.h" |
| 20 #include "chrome/browser/ui/libgtk2ui/gtk2_border.h" | 20 #include "chrome/browser/ui/libgtk2ui/gtk2_border.h" |
| 21 #include "chrome/browser/ui/libgtk2ui/gtk2_event_loop.h" |
| 21 #include "chrome/browser/ui/libgtk2ui/gtk2_key_bindings_handler.h" | 22 #include "chrome/browser/ui/libgtk2ui/gtk2_key_bindings_handler.h" |
| 22 #include "chrome/browser/ui/libgtk2ui/gtk2_signal_registrar.h" | 23 #include "chrome/browser/ui/libgtk2ui/gtk2_signal_registrar.h" |
| 23 #include "chrome/browser/ui/libgtk2ui/gtk2_util.h" | 24 #include "chrome/browser/ui/libgtk2ui/gtk2_util.h" |
| 24 #include "chrome/browser/ui/libgtk2ui/native_theme_gtk2.h" | 25 #include "chrome/browser/ui/libgtk2ui/native_theme_gtk2.h" |
| 25 #include "chrome/browser/ui/libgtk2ui/print_dialog_gtk2.h" | 26 #include "chrome/browser/ui/libgtk2ui/print_dialog_gtk2.h" |
| 26 #include "chrome/browser/ui/libgtk2ui/printing_gtk2_util.h" | 27 #include "chrome/browser/ui/libgtk2ui/printing_gtk2_util.h" |
| 27 #include "chrome/browser/ui/libgtk2ui/select_file_dialog_impl.h" | 28 #include "chrome/browser/ui/libgtk2ui/select_file_dialog_impl.h" |
| 28 #include "chrome/browser/ui/libgtk2ui/skia_utils_gtk2.h" | 29 #include "chrome/browser/ui/libgtk2ui/skia_utils_gtk2.h" |
| 29 #include "chrome/browser/ui/libgtk2ui/unity_service.h" | 30 #include "chrome/browser/ui/libgtk2ui/unity_service.h" |
| 30 #include "chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.h" | 31 #include "chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.h" |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 &PrintDialogGtk2::CreatePrintDialog); | 347 &PrintDialogGtk2::CreatePrintDialog); |
| 347 printing::PrintingContextLinux::SetPdfPaperSizeFunction( | 348 printing::PrintingContextLinux::SetPdfPaperSizeFunction( |
| 348 &GetPdfPaperSizeDeviceUnitsGtk); | 349 &GetPdfPaperSizeDeviceUnitsGtk); |
| 349 | 350 |
| 350 #if defined(USE_GCONF) | 351 #if defined(USE_GCONF) |
| 351 // We must build this after GTK gets initialized. | 352 // We must build this after GTK gets initialized. |
| 352 titlebar_listener_.reset(new GConfTitlebarListener(this)); | 353 titlebar_listener_.reset(new GConfTitlebarListener(this)); |
| 353 #endif // defined(USE_GCONF) | 354 #endif // defined(USE_GCONF) |
| 354 | 355 |
| 355 indicators_count = 0; | 356 indicators_count = 0; |
| 357 |
| 358 // Instantiate the singleton instance of Gtk2EventLoop. |
| 359 Gtk2EventLoop::GetInstance(); |
| 356 } | 360 } |
| 357 | 361 |
| 358 Gtk2UI::~Gtk2UI() { | 362 Gtk2UI::~Gtk2UI() { |
| 359 gtk_widget_destroy(fake_window_); | 363 gtk_widget_destroy(fake_window_); |
| 360 gtk_widget_destroy(fake_frame_); | 364 gtk_widget_destroy(fake_frame_); |
| 361 fake_label_.Destroy(); | 365 fake_label_.Destroy(); |
| 362 fake_entry_.Destroy(); | 366 fake_entry_.Destroy(); |
| 363 | 367 |
| 364 ClearAllThemeData(); | 368 ClearAllThemeData(); |
| 365 } | 369 } |
| (...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1377 | 1381 |
| 1378 FOR_EACH_OBSERVER(views::NativeThemeChangeObserver, theme_change_observers_, | 1382 FOR_EACH_OBSERVER(views::NativeThemeChangeObserver, theme_change_observers_, |
| 1379 OnNativeThemeChanged()); | 1383 OnNativeThemeChanged()); |
| 1380 } | 1384 } |
| 1381 | 1385 |
| 1382 } // namespace libgtk2ui | 1386 } // namespace libgtk2ui |
| 1383 | 1387 |
| 1384 views::LinuxUI* BuildGtk2UI() { | 1388 views::LinuxUI* BuildGtk2UI() { |
| 1385 return new libgtk2ui::Gtk2UI; | 1389 return new libgtk2ui::Gtk2UI; |
| 1386 } | 1390 } |
| OLD | NEW |