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

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

Issue 235693002: Merge 260900 "linux_aura: Port GtkKeybindingsHandler to Aura." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1916/src/
Patch Set: 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
« no previous file with comments | « chrome/browser/ui/libgtk2ui/gtk2_ui.h ('k') | chrome/browser/ui/libgtk2ui/libgtk2ui.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
11 #include "base/environment.h" 11 #include "base/environment.h"
12 #include "base/i18n/rtl.h" 12 #include "base/i18n/rtl.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/nix/mime_util_xdg.h" 14 #include "base/nix/mime_util_xdg.h"
15 #include "base/stl_util.h" 15 #include "base/stl_util.h"
16 #include "base/strings/stringprintf.h" 16 #include "base/strings/stringprintf.h"
17 #include "chrome/browser/themes/theme_properties.h" 17 #include "chrome/browser/themes/theme_properties.h"
18 #include "chrome/browser/ui/libgtk2ui/app_indicator_icon.h" 18 #include "chrome/browser/ui/libgtk2ui/app_indicator_icon.h"
19 #include "chrome/browser/ui/libgtk2ui/chrome_gtk_frame.h" 19 #include "chrome/browser/ui/libgtk2ui/chrome_gtk_frame.h"
20 #include "chrome/browser/ui/libgtk2ui/gtk2_border.h" 20 #include "chrome/browser/ui/libgtk2ui/gtk2_border.h"
21 #include "chrome/browser/ui/libgtk2ui/gtk2_key_bindings_handler.h"
21 #include "chrome/browser/ui/libgtk2ui/gtk2_signal_registrar.h" 22 #include "chrome/browser/ui/libgtk2ui/gtk2_signal_registrar.h"
22 #include "chrome/browser/ui/libgtk2ui/gtk2_util.h" 23 #include "chrome/browser/ui/libgtk2ui/gtk2_util.h"
23 #include "chrome/browser/ui/libgtk2ui/native_theme_gtk2.h" 24 #include "chrome/browser/ui/libgtk2ui/native_theme_gtk2.h"
24 #include "chrome/browser/ui/libgtk2ui/print_dialog_gtk2.h" 25 #include "chrome/browser/ui/libgtk2ui/print_dialog_gtk2.h"
25 #include "chrome/browser/ui/libgtk2ui/printing_gtk2_util.h" 26 #include "chrome/browser/ui/libgtk2ui/printing_gtk2_util.h"
26 #include "chrome/browser/ui/libgtk2ui/select_file_dialog_impl.h" 27 #include "chrome/browser/ui/libgtk2ui/select_file_dialog_impl.h"
27 #include "chrome/browser/ui/libgtk2ui/skia_utils_gtk2.h" 28 #include "chrome/browser/ui/libgtk2ui/skia_utils_gtk2.h"
28 #include "chrome/browser/ui/libgtk2ui/unity_service.h" 29 #include "chrome/browser/ui/libgtk2ui/unity_service.h"
29 #include "chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.h" 30 #include "chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.h"
30 #include "grit/theme_resources.h" 31 #include "grit/theme_resources.h"
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 bool Gtk2UI::UnityIsRunning() { 669 bool Gtk2UI::UnityIsRunning() {
669 return unity::IsRunning(); 670 return unity::IsRunning();
670 } 671 }
671 672
672 void Gtk2UI::NotifyWindowManagerStartupComplete() { 673 void Gtk2UI::NotifyWindowManagerStartupComplete() {
673 // TODO(port) Implement this using _NET_STARTUP_INFO_BEGIN/_NET_STARTUP_INFO 674 // TODO(port) Implement this using _NET_STARTUP_INFO_BEGIN/_NET_STARTUP_INFO
674 // from http://standards.freedesktop.org/startup-notification-spec/ instead. 675 // from http://standards.freedesktop.org/startup-notification-spec/ instead.
675 gdk_notify_startup_complete(); 676 gdk_notify_startup_complete();
676 } 677 }
677 678
679 bool Gtk2UI::MatchEvent(const ui::Event& event,
680 std::vector<ui::TextEditCommandX11>* commands) {
681 // Ensure that we have a keyboard handler.
682 if (!key_bindings_handler_)
683 key_bindings_handler_.reset(new Gtk2KeyBindingsHandler);
684
685 return key_bindings_handler_->MatchEvent(event, commands);
686 }
687
678 void Gtk2UI::GetScrollbarColors(GdkColor* thumb_active_color, 688 void Gtk2UI::GetScrollbarColors(GdkColor* thumb_active_color,
679 GdkColor* thumb_inactive_color, 689 GdkColor* thumb_inactive_color,
680 GdkColor* track_color) { 690 GdkColor* track_color) {
681 GdkColor* theme_thumb_active = NULL; 691 GdkColor* theme_thumb_active = NULL;
682 GdkColor* theme_thumb_inactive = NULL; 692 GdkColor* theme_thumb_inactive = NULL;
683 GdkColor* theme_trough_color = NULL; 693 GdkColor* theme_trough_color = NULL;
684 gtk_widget_style_get(GTK_WIDGET(fake_frame_), 694 gtk_widget_style_get(GTK_WIDGET(fake_frame_),
685 "scrollbar-slider-prelight-color", &theme_thumb_active, 695 "scrollbar-slider-prelight-color", &theme_thumb_active,
686 "scrollbar-slider-normal-color", &theme_thumb_inactive, 696 "scrollbar-slider-normal-color", &theme_thumb_inactive,
687 "scrollbar-trough-color", &theme_trough_color, 697 "scrollbar-trough-color", &theme_trough_color,
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
1367 1377
1368 FOR_EACH_OBSERVER(views::NativeThemeChangeObserver, theme_change_observers_, 1378 FOR_EACH_OBSERVER(views::NativeThemeChangeObserver, theme_change_observers_,
1369 OnNativeThemeChanged()); 1379 OnNativeThemeChanged());
1370 } 1380 }
1371 1381
1372 } // namespace libgtk2ui 1382 } // namespace libgtk2ui
1373 1383
1374 views::LinuxUI* BuildGtk2UI() { 1384 views::LinuxUI* BuildGtk2UI() {
1375 return new libgtk2ui::Gtk2UI; 1385 return new libgtk2ui::Gtk2UI;
1376 } 1386 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/libgtk2ui/gtk2_ui.h ('k') | chrome/browser/ui/libgtk2ui/libgtk2ui.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698