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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 FOR_EACH_OBSERVER(views::WindowButtonOrderObserver, observer_list_, | 677 FOR_EACH_OBSERVER(views::WindowButtonOrderObserver, observer_list_, |
678 OnWindowButtonOrderingChange(leading_buttons_, | 678 OnWindowButtonOrderingChange(leading_buttons_, |
679 trailing_buttons_)); | 679 trailing_buttons_)); |
680 } | 680 } |
681 | 681 |
682 void Gtk2UI::SetNonClientMiddleClickAction(NonClientMiddleClickAction action) { | 682 void Gtk2UI::SetNonClientMiddleClickAction(NonClientMiddleClickAction action) { |
683 middle_click_action_ = action; | 683 middle_click_action_ = action; |
684 } | 684 } |
685 | 685 |
686 scoped_ptr<ui::LinuxInputMethodContext> Gtk2UI::CreateInputMethodContext( | 686 scoped_ptr<ui::LinuxInputMethodContext> Gtk2UI::CreateInputMethodContext( |
687 ui::LinuxInputMethodContextDelegate* delegate) const { | 687 ui::LinuxInputMethodContextDelegate* delegate, |
| 688 bool is_simple) const { |
688 return scoped_ptr<ui::LinuxInputMethodContext>( | 689 return scoped_ptr<ui::LinuxInputMethodContext>( |
689 new X11InputMethodContextImplGtk2(delegate)); | 690 new X11InputMethodContextImplGtk2(delegate, is_simple)); |
690 } | 691 } |
691 | 692 |
692 gfx::FontRenderParams Gtk2UI::GetDefaultFontRenderParams() const { | 693 gfx::FontRenderParams Gtk2UI::GetDefaultFontRenderParams() const { |
693 static gfx::FontRenderParams params = GetGtkFontRenderParams(); | 694 static gfx::FontRenderParams params = GetGtkFontRenderParams(); |
694 return params; | 695 return params; |
695 } | 696 } |
696 | 697 |
697 void Gtk2UI::GetDefaultFontDescription( | 698 void Gtk2UI::GetDefaultFontDescription( |
698 std::string* family_out, | 699 std::string* family_out, |
699 int* size_pixels_out, | 700 int* size_pixels_out, |
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1418 device_scale_factor_ = device_scale_factor; | 1419 device_scale_factor_ = device_scale_factor; |
1419 GtkStyle* label_style = gtk_rc_get_style(fake_label_.get()); | 1420 GtkStyle* label_style = gtk_rc_get_style(fake_label_.get()); |
1420 UpdateDefaultFont(label_style->font_desc); | 1421 UpdateDefaultFont(label_style->font_desc); |
1421 } | 1422 } |
1422 | 1423 |
1423 } // namespace libgtk2ui | 1424 } // namespace libgtk2ui |
1424 | 1425 |
1425 views::LinuxUI* BuildGtk2UI() { | 1426 views::LinuxUI* BuildGtk2UI() { |
1426 return new libgtk2ui::Gtk2UI; | 1427 return new libgtk2ui::Gtk2UI; |
1427 } | 1428 } |
OLD | NEW |