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

Side by Side Diff: views/view_gtk.cc

Issue 200035: First cut at implementation of FindBar for views / gtk... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "views/view.h" 5 #include "views/view.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 10
11 namespace views { 11 namespace views {
12 12
13 ViewAccessibilityWrapper* View::GetViewAccessibilityWrapper() { 13 ViewAccessibilityWrapper* View::GetViewAccessibilityWrapper() {
14 NOTIMPLEMENTED(); 14 NOTIMPLEMENTED();
15 return NULL; 15 return NULL;
16 } 16 }
17 17
18 void View::Focus() {
19 NOTIMPLEMENTED();
20 }
21
22 int View::GetHorizontalDragThreshold() { 18 int View::GetHorizontalDragThreshold() {
23 static bool determined_threshold = false; 19 static bool determined_threshold = false;
24 static int drag_threshold = 8; 20 static int drag_threshold = 8;
25 if (determined_threshold) 21 if (determined_threshold)
26 return drag_threshold; 22 return drag_threshold;
27 determined_threshold = true; 23 determined_threshold = true;
28 GtkSettings* settings = gtk_settings_get_default(); 24 GtkSettings* settings = gtk_settings_get_default();
29 if (!settings) 25 if (!settings)
30 return drag_threshold; 26 return drag_threshold;
31 int value = 0; 27 int value = 0;
32 g_object_get(G_OBJECT(settings), "gtk-dnd-drag-threshold", &value, NULL); 28 g_object_get(G_OBJECT(settings), "gtk-dnd-drag-threshold", &value, NULL);
33 if (value) 29 if (value)
34 drag_threshold = value; 30 drag_threshold = value;
35 return drag_threshold; 31 return drag_threshold;
36 } 32 }
37 33
38 int View::GetVerticalDragThreshold() { 34 int View::GetVerticalDragThreshold() {
39 // Vertical and horizontal drag threshold are the same in Gtk. 35 // Vertical and horizontal drag threshold are the same in Gtk.
40 return GetHorizontalDragThreshold(); 36 return GetHorizontalDragThreshold();
41 } 37 }
42 38
43 } // namespace views 39 } // namespace views
OLDNEW
« views/controls/textfield/textfield.h ('K') | « views/view.cc ('k') | views/view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698