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

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

Issue 239093007: Update Windows UI on system color changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make Widget the observer, address additional comments. Created 6 years, 8 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
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 <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 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 656
657 return out_font_name; 657 return out_font_name;
658 } 658 }
659 659
660 ui::SelectFileDialog* Gtk2UI::CreateSelectFileDialog( 660 ui::SelectFileDialog* Gtk2UI::CreateSelectFileDialog(
661 ui::SelectFileDialog::Listener* listener, 661 ui::SelectFileDialog::Listener* listener,
662 ui::SelectFilePolicy* policy) const { 662 ui::SelectFilePolicy* policy) const {
663 return SelectFileDialogImpl::Create(listener, policy); 663 return SelectFileDialogImpl::Create(listener, policy);
664 } 664 }
665 665
666 void Gtk2UI::AddNativeThemeChangeObserver(
667 views::NativeThemeChangeObserver* observer) {
668 theme_change_observers_.AddObserver(observer);
669 }
670
671 void Gtk2UI::RemoveNativeThemeChangeObserver(
672 views::NativeThemeChangeObserver* observer) {
673 theme_change_observers_.RemoveObserver(observer);
674 }
675
676 bool Gtk2UI::UnityIsRunning() { 666 bool Gtk2UI::UnityIsRunning() {
677 return unity::IsRunning(); 667 return unity::IsRunning();
678 } 668 }
679 669
680 views::LinuxUI::NonClientMiddleClickAction 670 views::LinuxUI::NonClientMiddleClickAction
681 Gtk2UI::GetNonClientMiddleClickAction() { 671 Gtk2UI::GetNonClientMiddleClickAction() {
682 return middle_click_action_; 672 return middle_click_action_;
683 } 673 }
684 674
685 void Gtk2UI::NotifyWindowManagerStartupComplete() { 675 void Gtk2UI::NotifyWindowManagerStartupComplete() {
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
1370 gtk_widget_destroy(window); 1360 gtk_widget_destroy(window);
1371 } 1361 }
1372 1362
1373 void Gtk2UI::ClearAllThemeData() { 1363 void Gtk2UI::ClearAllThemeData() {
1374 gtk_images_.clear(); 1364 gtk_images_.clear();
1375 } 1365 }
1376 1366
1377 void Gtk2UI::OnStyleSet(GtkWidget* widget, GtkStyle* previous_style) { 1367 void Gtk2UI::OnStyleSet(GtkWidget* widget, GtkStyle* previous_style) {
1378 ClearAllThemeData(); 1368 ClearAllThemeData();
1379 LoadGtkValues(); 1369 LoadGtkValues();
1380 1370 NativeThemeGtk2::instance()->NotifyNativeThemeObservers();
1381 FOR_EACH_OBSERVER(views::NativeThemeChangeObserver, theme_change_observers_,
1382 OnNativeThemeChanged());
1383 } 1371 }
1384 1372
1385 } // namespace libgtk2ui 1373 } // namespace libgtk2ui
1386 1374
1387 views::LinuxUI* BuildGtk2UI() { 1375 views::LinuxUI* BuildGtk2UI() {
1388 return new libgtk2ui::Gtk2UI; 1376 return new libgtk2ui::Gtk2UI;
1389 } 1377 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698