| 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" |
| (...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 | 670 |
| 671 return out_font_name; | 671 return out_font_name; |
| 672 } | 672 } |
| 673 | 673 |
| 674 ui::SelectFileDialog* Gtk2UI::CreateSelectFileDialog( | 674 ui::SelectFileDialog* Gtk2UI::CreateSelectFileDialog( |
| 675 ui::SelectFileDialog::Listener* listener, | 675 ui::SelectFileDialog::Listener* listener, |
| 676 ui::SelectFilePolicy* policy) const { | 676 ui::SelectFilePolicy* policy) const { |
| 677 return SelectFileDialogImpl::Create(listener, policy); | 677 return SelectFileDialogImpl::Create(listener, policy); |
| 678 } | 678 } |
| 679 | 679 |
| 680 void Gtk2UI::AddNativeThemeChangeObserver( | |
| 681 views::NativeThemeChangeObserver* observer) { | |
| 682 theme_change_observers_.AddObserver(observer); | |
| 683 } | |
| 684 | |
| 685 void Gtk2UI::RemoveNativeThemeChangeObserver( | |
| 686 views::NativeThemeChangeObserver* observer) { | |
| 687 theme_change_observers_.RemoveObserver(observer); | |
| 688 } | |
| 689 | |
| 690 bool Gtk2UI::UnityIsRunning() { | 680 bool Gtk2UI::UnityIsRunning() { |
| 691 return unity::IsRunning(); | 681 return unity::IsRunning(); |
| 692 } | 682 } |
| 693 | 683 |
| 694 views::LinuxUI::NonClientMiddleClickAction | 684 views::LinuxUI::NonClientMiddleClickAction |
| 695 Gtk2UI::GetNonClientMiddleClickAction() { | 685 Gtk2UI::GetNonClientMiddleClickAction() { |
| 696 return middle_click_action_; | 686 return middle_click_action_; |
| 697 } | 687 } |
| 698 | 688 |
| 699 void Gtk2UI::NotifyWindowManagerStartupComplete() { | 689 void Gtk2UI::NotifyWindowManagerStartupComplete() { |
| (...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1384 gtk_widget_destroy(window); | 1374 gtk_widget_destroy(window); |
| 1385 } | 1375 } |
| 1386 | 1376 |
| 1387 void Gtk2UI::ClearAllThemeData() { | 1377 void Gtk2UI::ClearAllThemeData() { |
| 1388 gtk_images_.clear(); | 1378 gtk_images_.clear(); |
| 1389 } | 1379 } |
| 1390 | 1380 |
| 1391 void Gtk2UI::OnStyleSet(GtkWidget* widget, GtkStyle* previous_style) { | 1381 void Gtk2UI::OnStyleSet(GtkWidget* widget, GtkStyle* previous_style) { |
| 1392 ClearAllThemeData(); | 1382 ClearAllThemeData(); |
| 1393 LoadGtkValues(); | 1383 LoadGtkValues(); |
| 1394 | 1384 NativeThemeGtk2::instance()->NotifyNativeThemeObservers(); |
| 1395 FOR_EACH_OBSERVER(views::NativeThemeChangeObserver, theme_change_observers_, | |
| 1396 OnNativeThemeChanged()); | |
| 1397 } | 1385 } |
| 1398 | 1386 |
| 1399 } // namespace libgtk2ui | 1387 } // namespace libgtk2ui |
| 1400 | 1388 |
| 1401 views::LinuxUI* BuildGtk2UI() { | 1389 views::LinuxUI* BuildGtk2UI() { |
| 1402 return new libgtk2ui::Gtk2UI; | 1390 return new libgtk2ui::Gtk2UI; |
| 1403 } | 1391 } |
| OLD | NEW |