summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/prefs/browser_prefs.cc3
-rw-r--r--chrome/browser/ui/gesture_prefs.cc8
-rw-r--r--chrome/browser/ui/gesture_prefs.h15
-rw-r--r--chrome/browser/ui/views/aura/gesture_prefs_aura.cc110
-rw-r--r--chrome/chrome_browser.gypi6
-rw-r--r--chrome/common/pref_names.cc11
-rw-r--r--chrome/common/pref_names.h6
-rw-r--r--ui/aura/gestures/gesture_configuration.h3
8 files changed, 1 insertions, 161 deletions
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index af290c2..66d6344 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -52,7 +52,6 @@
#include "chrome/browser/ui/alternate_error_tab_observer.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_init.h"
-#include "chrome/browser/ui/gesture_prefs.h"
#include "chrome/browser/ui/prefs/prefs_tab_helper.h"
#include "chrome/browser/ui/search_engines/keyword_editor_controller.h"
#include "chrome/browser/ui/webui/flags_ui.h"
@@ -161,8 +160,6 @@ void RegisterLocalState(PrefService* local_state) {
#if defined(OS_MACOSX)
confirm_quit::RegisterLocalState(local_state);
#endif
-
- GesturePrefsRegisterPrefs(local_state);
}
void RegisterUserPrefs(PrefService* user_prefs) {
diff --git a/chrome/browser/ui/gesture_prefs.cc b/chrome/browser/ui/gesture_prefs.cc
deleted file mode 100644
index 8636050..0000000
--- a/chrome/browser/ui/gesture_prefs.cc
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/ui/gesture_prefs.h"
-
-void GesturePrefsRegisterPrefs(PrefService* prefs) {
-}
diff --git a/chrome/browser/ui/gesture_prefs.h b/chrome/browser/ui/gesture_prefs.h
deleted file mode 100644
index e19bcb9..0000000
--- a/chrome/browser/ui/gesture_prefs.h
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_UI_GESTURE_PREFS_H_
-#define CHROME_BROWSER_UI_GESTURE_PREFS_H_
-#pragma once
-
-#include "base/compiler_specific.h"
-
-class PrefService;
-
-void GesturePrefsRegisterPrefs(PrefService* prefs);
-
-#endif // CHROME_BROWSER_UI_GESTURE_PREFS_H_
diff --git a/chrome/browser/ui/views/aura/gesture_prefs_aura.cc b/chrome/browser/ui/views/aura/gesture_prefs_aura.cc
deleted file mode 100644
index ac6f137..0000000
--- a/chrome/browser/ui/views/aura/gesture_prefs_aura.cc
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/memory/singleton.h"
-#include "chrome/browser/browser_process.h"
-#include "chrome/browser/ui/gesture_prefs.h"
-#include "chrome/browser/prefs/pref_change_registrar.h"
-#include "chrome/browser/prefs/pref_service.h"
-#include "chrome/common/chrome_notification_types.h"
-#include "chrome/common/pref_names.h"
-#include "content/public/browser/notification_observer.h"
-#include "ui/aura/gestures/gesture_configuration.h"
-
-namespace {
-
-// This class manages gesture configuration preferences.
-class GesturePrefsObserverAura : public content::NotificationObserver {
- public:
- static GesturePrefsObserverAura *GetInstance();
- void RegisterPrefs(PrefService* prefs);
-
- private:
- GesturePrefsObserverAura();
- friend struct DefaultSingletonTraits<GesturePrefsObserverAura>;
- virtual ~GesturePrefsObserverAura();
-
- // content::NotificationObserver implementation.
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
-
- private:
- void Update();
-
- PrefChangeRegistrar registrar_;
-
- DISALLOW_COPY_AND_ASSIGN(GesturePrefsObserverAura);
-};
-
-GesturePrefsObserverAura::GesturePrefsObserverAura() {
-}
-
-GesturePrefsObserverAura::~GesturePrefsObserverAura() {
-}
-
-GesturePrefsObserverAura* GesturePrefsObserverAura::GetInstance() {
- return Singleton<GesturePrefsObserverAura>::get();
-}
-
-// The list of prefs we want to observe.
-// Note that this collection of settings should correspond to the settings used
-// in ui/aura/gestures/gesture_configuration.h
-const char* kPrefsToObserve[] = {
- prefs::kMaximumSecondsBetweenDoubleClick,
- prefs::kMaximumTouchDownDurationInSecondsForClick,
- prefs::kMaximumTouchMoveInPixelsForClick,
- prefs::kMinFlickSpeedSquared,
- prefs::kMinimumTouchDownDurationInSecondsForClick,
-};
-
-const int kPrefsToObserveLength = arraysize(kPrefsToObserve);
-
-void GesturePrefsObserverAura::RegisterPrefs(PrefService* ) {
- PrefService* local_state = g_browser_process->local_state();
-
- local_state->RegisterDoublePref(
- prefs::kMaximumSecondsBetweenDoubleClick, 0.7);
- local_state->RegisterDoublePref(
- prefs::kMaximumTouchDownDurationInSecondsForClick, 0.8);
- local_state->RegisterDoublePref(
- prefs::kMaximumTouchMoveInPixelsForClick, 20);
- local_state->RegisterDoublePref(
- prefs::kMinFlickSpeedSquared, 550.f*550.f);
- local_state->RegisterDoublePref(
- prefs::kMinimumTouchDownDurationInSecondsForClick, 0.01);
-
- registrar_.Init(local_state);
- if (local_state) {
- for (int i = 0; i < kPrefsToObserveLength; ++i)
- registrar_.Add(kPrefsToObserve[i], this);
- }
-}
-
-void GesturePrefsObserverAura::Update() {
- PrefService* local_state = g_browser_process->local_state();
-
- aura::GestureConfiguration::set_max_seconds_between_double_click(
- local_state->GetDouble(prefs::kMaximumSecondsBetweenDoubleClick));
- aura::GestureConfiguration::set_max_touch_down_duration_in_seconds_for_click(
- local_state->GetDouble(prefs::kMaximumTouchDownDurationInSecondsForClick));
- aura::GestureConfiguration::set_max_touch_move_in_pixels_for_click(
- local_state->GetDouble(prefs::kMaximumTouchMoveInPixelsForClick));
- aura::GestureConfiguration::set_min_flick_speed_squared(
- local_state->GetDouble(prefs::kMinFlickSpeedSquared));
- aura::GestureConfiguration::set_min_touch_down_duration_in_seconds_for_click(
- local_state->GetDouble(prefs::kMinimumTouchDownDurationInSecondsForClick));
-}
-
-void GesturePrefsObserverAura::Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) {
- Update();
-}
-
-} // namespace
-
-void GesturePrefsRegisterPrefs(PrefService* prefs) {
- GesturePrefsObserverAura::GetInstance()->RegisterPrefs(prefs);
-}
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 9ead028..29d8bd5 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -3131,8 +3131,6 @@
'browser/ui/fullscreen_exit_bubble.h',
'browser/ui/fullscreen_exit_bubble_type.cc',
'browser/ui/fullscreen_exit_bubble_type.h',
- 'browser/ui/gesture_prefs.cc',
- 'browser/ui/gesture_prefs.h',
'browser/ui/global_error.cc',
'browser/ui/global_error.h',
'browser/ui/global_error_bubble_view_base.h',
@@ -3535,7 +3533,6 @@
'browser/ui/views/aura/caps_lock_handler.h',
'browser/ui/views/aura/chrome_shell_delegate.cc',
'browser/ui/views/aura/chrome_shell_delegate.h',
- 'browser/ui/views/aura/gesture_prefs_aura.cc',
'browser/ui/views/aura/ime_controller_chromeos.cc',
'browser/ui/views/aura/ime_controller_chromeos.h',
'browser/ui/views/aura/launcher/chrome_launcher_delegate.cc',
@@ -4568,8 +4565,6 @@
['exclude', '^browser/renderer_host/render_widget_host_view_views*'],
['exclude', '^browser/tab_contents/web_drag_source_win.cc'],
['exclude', '^browser/tab_contents/web_drag_source_win.h'],
- ['exclude', '^browser/ui/gesture_prefs.cc'],
- ['exclude', '^browser/ui/input_window_dialog_linux.cc'],
['exclude', '^browser/ui/panels/auto_hiding_desktop_bar_win.cc'],
['exclude', '^browser/ui/tabs/dock_info_win.cc'],
['exclude', '^browser/ui/views/about_ipc_dialog.cc'],
@@ -4612,7 +4607,6 @@
['include', '^browser/chromeos/status/status_area_button.h'],
['include', '^browser/chromeos/status/status_area_view.cc'],
['include', '^browser/chromeos/status/status_area_view.h'],
- ['include', '^browser/ui/views/aura/gesture_prefs_aura.cc'],
['include', '^browser/ui/views/simple_message_box_views.cc'],
['include', '^browser/ui/views/simple_message_box_views.h'],
['include', '^browser/ui/webui/certificate_viewer_webui.cc'],
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
index 9155bd1..accfd2d 100644
--- a/chrome/common/pref_names.cc
+++ b/chrome/common/pref_names.cc
@@ -1772,17 +1772,6 @@ const char kWebIntentsEnabled[] = "webintents.enabled";
#if defined(USE_AURA)
const char kPinnedLauncherApps[] = "pinned_launcher_apps";
-
-const char kMaximumSecondsBetweenDoubleClick[] =
- "gesture.maximum_seconds_between_double_click";
-const char kMaximumTouchDownDurationInSecondsForClick[] =
- "gesture.maximum_touch_down_duration_in_seconds_for_click";
-const char kMaximumTouchMoveInPixelsForClick[] =
- "gesture.maximum_touch_move_in_pixels_for_click";
-const char kMinFlickSpeedSquared[] =
- "gesture.min_flick_speed_squared";
-const char kMinimumTouchDownDurationInSecondsForClick[] =
- "gesture.minimum_touch_down_duration_in_seconds_for_click";
#endif
// Indicates whether the browser is in managed mode.
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
index 406d484..248a4b2 100644
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -663,12 +663,6 @@ extern const char kWebIntentsEnabled[];
#if defined(USE_AURA)
extern const char kPinnedLauncherApps[];
-
-extern const char kMaximumSecondsBetweenDoubleClick[];
-extern const char kMaximumTouchDownDurationInSecondsForClick[];
-extern const char kMaximumTouchMoveInPixelsForClick[];
-extern const char kMinFlickSpeedSquared[];
-extern const char kMinimumTouchDownDurationInSecondsForClick[];
#endif
extern const char kInManagedMode[];
diff --git a/ui/aura/gestures/gesture_configuration.h b/ui/aura/gestures/gesture_configuration.h
index f36cf99..a1365b4 100644
--- a/ui/aura/gestures/gesture_configuration.h
+++ b/ui/aura/gestures/gesture_configuration.h
@@ -7,7 +7,6 @@
#pragma once
#include "base/basictypes.h"
-#include "ui/aura/aura_export.h"
namespace aura {
@@ -15,7 +14,7 @@ namespace aura {
// approaches (windows, chrome, others). This would turn into an
// abstract base class.
-class AURA_EXPORT GestureConfiguration {
+class GestureConfiguration {
public:
static double max_touch_down_duration_in_seconds_for_click() {
return max_touch_down_duration_in_seconds_for_click_;