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

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

Issue 1068093002: Refactoring for InputMethodAuraLinux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed interactive_ui_tests failure. Created 5 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
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 <pango/pango.h> 9 #include <pango/pango.h>
10 10
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 FOR_EACH_OBSERVER(views::WindowButtonOrderObserver, observer_list_, 681 FOR_EACH_OBSERVER(views::WindowButtonOrderObserver, observer_list_,
682 OnWindowButtonOrderingChange(leading_buttons_, 682 OnWindowButtonOrderingChange(leading_buttons_,
683 trailing_buttons_)); 683 trailing_buttons_));
684 } 684 }
685 685
686 void Gtk2UI::SetNonClientMiddleClickAction(NonClientMiddleClickAction action) { 686 void Gtk2UI::SetNonClientMiddleClickAction(NonClientMiddleClickAction action) {
687 middle_click_action_ = action; 687 middle_click_action_ = action;
688 } 688 }
689 689
690 scoped_ptr<ui::LinuxInputMethodContext> Gtk2UI::CreateInputMethodContext( 690 scoped_ptr<ui::LinuxInputMethodContext> Gtk2UI::CreateInputMethodContext(
691 ui::LinuxInputMethodContextDelegate* delegate) const { 691 ui::LinuxInputMethodContextDelegate* delegate,
692 bool is_simple) const {
692 return scoped_ptr<ui::LinuxInputMethodContext>( 693 return scoped_ptr<ui::LinuxInputMethodContext>(
693 new X11InputMethodContextImplGtk2(delegate)); 694 new X11InputMethodContextImplGtk2(delegate, is_simple));
694 } 695 }
695 696
696 gfx::FontRenderParams Gtk2UI::GetDefaultFontRenderParams() const { 697 gfx::FontRenderParams Gtk2UI::GetDefaultFontRenderParams() const {
697 static gfx::FontRenderParams params = GetGtkFontRenderParams(); 698 static gfx::FontRenderParams params = GetGtkFontRenderParams();
698 return params; 699 return params;
699 } 700 }
700 701
701 void Gtk2UI::GetDefaultFontDescription( 702 void Gtk2UI::GetDefaultFontDescription(
702 std::string* family_out, 703 std::string* family_out,
703 int* size_pixels_out, 704 int* size_pixels_out,
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
1428 const int kCSSDefaultDPI = 96; 1429 const int kCSSDefaultDPI = 96;
1429 const float scale = GetDPI() / kCSSDefaultDPI; 1430 const float scale = GetDPI() / kCSSDefaultDPI;
1430 return ui::GetScaleForScaleFactor(ui::GetSupportedScaleFactor(scale)); 1431 return ui::GetScaleForScaleFactor(ui::GetSupportedScaleFactor(scale));
1431 } 1432 }
1432 1433
1433 } // namespace libgtk2ui 1434 } // namespace libgtk2ui
1434 1435
1435 views::LinuxUI* BuildGtk2UI() { 1436 views::LinuxUI* BuildGtk2UI() {
1436 return new libgtk2ui::Gtk2UI; 1437 return new libgtk2ui::Gtk2UI;
1437 } 1438 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/libgtk2ui/gtk2_ui.h ('k') | chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698