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

Unified Diff: chrome/browser/ui/libgtk2ui/gtk2_ui.cc

Issue 229783002: linux_aura: Use system configuration for middle clicking the titlebar. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sadrul nits 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/libgtk2ui/gtk2_ui.cc
diff --git a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
index f7bcb45eecb0207d3f0aec15d83ede064fe1a1fa..4229b033916e33627d96a32fe50824a92902ca26 100644
--- a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
+++ b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
@@ -46,7 +46,7 @@
#include "ui/views/linux_ui/window_button_order_observer.h"
#if defined(USE_GCONF)
-#include "chrome/browser/ui/libgtk2ui/gconf_titlebar_listener.h"
+#include "chrome/browser/ui/libgtk2ui/gconf_listener.h"
#endif
// A minimized port of GtkThemeService into something that can provide colors
@@ -318,7 +318,7 @@ color_utils::HSL GetDefaultTint(int id) {
namespace libgtk2ui {
-Gtk2UI::Gtk2UI() {
+Gtk2UI::Gtk2UI() : middle_click_action_(MIDDLE_CLICK_ACTION_LOWER) {
GtkInitFromCommandLine(*CommandLine::ForCurrentProcess());
}
@@ -350,7 +350,7 @@ void Gtk2UI::Initialize() {
#if defined(USE_GCONF)
// We must build this after GTK gets initialized.
- titlebar_listener_.reset(new GConfTitlebarListener(this));
+ gconf_listener_.reset(new GConfListener(this));
#endif // defined(USE_GCONF)
indicators_count = 0;
@@ -565,6 +565,10 @@ void Gtk2UI::SetWindowButtonOrdering(
trailing_buttons_));
}
+void Gtk2UI::SetNonClientMiddleClickAction(NonClientMiddleClickAction action) {
+ middle_click_action_ = action;
+}
+
scoped_ptr<ui::LinuxInputMethodContext> Gtk2UI::CreateInputMethodContext(
ui::LinuxInputMethodContextDelegate* delegate) const {
return scoped_ptr<ui::LinuxInputMethodContext>(
@@ -674,6 +678,11 @@ bool Gtk2UI::UnityIsRunning() {
return unity::IsRunning();
}
+views::LinuxUI::NonClientMiddleClickAction
+Gtk2UI::GetNonClientMiddleClickAction() {
+ return middle_click_action_;
+}
+
void Gtk2UI::NotifyWindowManagerStartupComplete() {
// TODO(port) Implement this using _NET_STARTUP_INFO_BEGIN/_NET_STARTUP_INFO
// from http://standards.freedesktop.org/startup-notification-spec/ instead.
« 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