Chromium Code Reviews

Side by Side Diff: views/widget/root_view.cc

Issue 5857002: no native implementation of Textfield. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
« views/event.h ('K') | « views/views.gyp ('k') | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/widget/root_view.h" 5 #include "views/widget/root_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "app/drag_drop_types.h" 9 #include "app/drag_drop_types.h"
10 #include "app/keyboard_codes.h" 10 #include "app/keyboard_codes.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/message_loop.h" 12 #include "base/message_loop.h"
13 #include "gfx/canvas_skia.h" 13 #include "gfx/canvas_skia.h"
14 #include "views/fill_layout.h" 14 #include "views/fill_layout.h"
15 #include "views/focus/view_storage.h" 15 #include "views/focus/view_storage.h"
16 #include "views/widget/widget.h" 16 #include "views/widget/widget.h"
17 #include "views/window/window.h" 17 #include "views/window/window.h"
18 18
19 #if defined(TOUCH_UI) 19 #if defined(TOUCH_UI)
20 #include "views/touchui/gesture_manager.h" 20 #include "views/touchui/gesture_manager.h"
21 #endif 21 #endif
22 22
23 #if defined(OS_LINUX) 23 #if defined(OS_LINUX)
24 #include "views/widget/widget_gtk.h" 24 #include "views/widget/widget_gtk.h"
25 #include "views/controls/textfield/native_textfield_view.h"
25 #endif // defined(OS_LINUX) 26 #endif // defined(OS_LINUX)
26 27
27 namespace views { 28 namespace views {
28 29
29 ///////////////////////////////////////////////////////////////////////////// 30 /////////////////////////////////////////////////////////////////////////////
30 // 31 //
31 // A Task to trigger non urgent painting. 32 // A Task to trigger non urgent painting.
32 // 33 //
33 ///////////////////////////////////////////////////////////////////////////// 34 /////////////////////////////////////////////////////////////////////////////
34 class PaintTask : public Task { 35 class PaintTask : public Task {
(...skipping 575 matching lines...)
610 // We may not have a FocusManager when the window that contains us is being 611 // We may not have a FocusManager when the window that contains us is being
611 // deleted. Sadly we cannot wait for the window to be destroyed before we 612 // deleted. Sadly we cannot wait for the window to be destroyed before we
612 // remove the FocusManager (see xp_frame.cc for more info). 613 // remove the FocusManager (see xp_frame.cc for more info).
613 return NULL; 614 return NULL;
614 } 615 }
615 616
616 // Make sure the focused view belongs to this RootView's view hierarchy. 617 // Make sure the focused view belongs to this RootView's view hierarchy.
617 View* view = focus_manager->GetFocusedView(); 618 View* view = focus_manager->GetFocusedView();
618 if (view && (view->GetRootView() == this)) 619 if (view && (view->GetRootView() == this))
619 return view; 620 return view;
620 #if defined(TOUCH_UI) 621
621 // hack to deal with two root views in touch 622 #if defined(OS_LINUX)
rjkroege 2010/12/15 21:23:31 probably should stay TOUCH_UI? IMO, TOUCH_UI can
oshima 2010/12/16 01:15:19 This is necessary for NativeTextfieldView to work
622 // should be fixed by eliminating one of them 623 if (view && NativeTextfieldView::IsTextfieldViewEnabled()) {
623 if (view) 624 // hack to deal with two root views.
625 // should be fixed by eliminating one of them
624 return view; 626 return view;
627 }
625 #endif 628 #endif
626 return NULL; 629 return NULL;
627 } 630 }
628 631
629 FocusSearch* RootView::GetFocusSearch() { 632 FocusSearch* RootView::GetFocusSearch() {
630 return &focus_search_; 633 return &focus_search_;
631 } 634 }
632 635
633 FocusTraversable* RootView::GetFocusTraversableParent() { 636 FocusTraversable* RootView::GetFocusTraversableParent() {
634 return focus_traversable_parent_; 637 return focus_traversable_parent_;
(...skipping 147 matching lines...)
782 #elif defined(OS_LINUX) 785 #elif defined(OS_LINUX)
783 gfx::NativeView native_view = 786 gfx::NativeView native_view =
784 static_cast<WidgetGtk*>(GetWidget())->window_contents(); 787 static_cast<WidgetGtk*>(GetWidget())->window_contents();
785 if (!native_view) 788 if (!native_view)
786 return; 789 return;
787 gdk_window_set_cursor(native_view->window, cursor); 790 gdk_window_set_cursor(native_view->window, cursor);
788 #endif 791 #endif
789 } 792 }
790 793
791 } // namespace views 794 } // namespace views
OLDNEW
« views/event.h ('K') | « views/views.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine