| 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 <pango/pango.h> | 9 #include <pango/pango.h> |
| 10 | 10 |
| (...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 image_skia.MakeThreadSafe(); | 617 image_skia.MakeThreadSafe(); |
| 618 return gfx::Image(image_skia); | 618 return gfx::Image(image_skia); |
| 619 } | 619 } |
| 620 return gfx::Image(); | 620 return gfx::Image(); |
| 621 } | 621 } |
| 622 | 622 |
| 623 scoped_ptr<views::Border> Gtk2UI::CreateNativeBorder( | 623 scoped_ptr<views::Border> Gtk2UI::CreateNativeBorder( |
| 624 views::LabelButton* owning_button, | 624 views::LabelButton* owning_button, |
| 625 scoped_ptr<views::LabelButtonBorder> border) { | 625 scoped_ptr<views::LabelButtonBorder> border) { |
| 626 if (owning_button->GetNativeTheme() != NativeThemeGtk2::instance()) | 626 if (owning_button->GetNativeTheme() != NativeThemeGtk2::instance()) |
| 627 return border.PassAs<views::Border>(); | 627 return border.Pass(); |
| 628 | 628 |
| 629 return scoped_ptr<views::Border>( | 629 return make_scoped_ptr(new Gtk2Border(this, owning_button, border.Pass())); |
| 630 new Gtk2Border(this, owning_button, border.Pass())); | |
| 631 } | 630 } |
| 632 | 631 |
| 633 void Gtk2UI::AddWindowButtonOrderObserver( | 632 void Gtk2UI::AddWindowButtonOrderObserver( |
| 634 views::WindowButtonOrderObserver* observer) { | 633 views::WindowButtonOrderObserver* observer) { |
| 635 if (!leading_buttons_.empty() || !trailing_buttons_.empty()) { | 634 if (!leading_buttons_.empty() || !trailing_buttons_.empty()) { |
| 636 observer->OnWindowButtonOrderingChange(leading_buttons_, | 635 observer->OnWindowButtonOrderingChange(leading_buttons_, |
| 637 trailing_buttons_); | 636 trailing_buttons_); |
| 638 } | 637 } |
| 639 | 638 |
| 640 observer_list_.AddObserver(observer); | 639 observer_list_.AddObserver(observer); |
| (...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1358 ClearAllThemeData(); | 1357 ClearAllThemeData(); |
| 1359 LoadGtkValues(); | 1358 LoadGtkValues(); |
| 1360 NativeThemeGtk2::instance()->NotifyObservers(); | 1359 NativeThemeGtk2::instance()->NotifyObservers(); |
| 1361 } | 1360 } |
| 1362 | 1361 |
| 1363 } // namespace libgtk2ui | 1362 } // namespace libgtk2ui |
| 1364 | 1363 |
| 1365 views::LinuxUI* BuildGtk2UI() { | 1364 views::LinuxUI* BuildGtk2UI() { |
| 1366 return new libgtk2ui::Gtk2UI; | 1365 return new libgtk2ui::Gtk2UI; |
| 1367 } | 1366 } |
| OLD | NEW |