| OLD | NEW | 
|    1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |    1 // Copyright (c) 2006-2008 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/gfx/canvas.h" |   10 #include "app/gfx/canvas.h" | 
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   47  |   47  | 
|   48 const char RootView::kViewClassName[] = "views/RootView"; |   48 const char RootView::kViewClassName[] = "views/RootView"; | 
|   49  |   49  | 
|   50 ///////////////////////////////////////////////////////////////////////////// |   50 ///////////////////////////////////////////////////////////////////////////// | 
|   51 // |   51 // | 
|   52 // RootView - constructors, destructors, initialization |   52 // RootView - constructors, destructors, initialization | 
|   53 // |   53 // | 
|   54 ///////////////////////////////////////////////////////////////////////////// |   54 ///////////////////////////////////////////////////////////////////////////// | 
|   55  |   55  | 
|   56 RootView::RootView(Widget* widget) |   56 RootView::RootView(Widget* widget) | 
|   57   : mouse_pressed_handler_(NULL), |   57     : mouse_pressed_handler_(NULL), | 
|   58     mouse_move_handler_(NULL), |   58       mouse_move_handler_(NULL), | 
|   59     last_click_handler_(NULL), |   59       last_click_handler_(NULL), | 
|   60     widget_(widget), |   60       widget_(widget), | 
|   61     invalid_rect_urgent_(false), |   61       invalid_rect_urgent_(false), | 
|   62     pending_paint_task_(NULL), |   62       pending_paint_task_(NULL), | 
|   63     paint_task_needed_(false), |   63       paint_task_needed_(false), | 
|   64     explicit_mouse_handler_(false), |   64       explicit_mouse_handler_(false), | 
|   65 #if defined(OS_WIN) |   65 #if defined(OS_WIN) | 
|   66     previous_cursor_(NULL), |   66       previous_cursor_(NULL), | 
|   67 #endif |   67 #endif | 
|   68     default_keyboard_handler_(NULL), |   68       default_keyboard_handler_(NULL), | 
|   69     focus_on_mouse_pressed_(false), |   69       focus_on_mouse_pressed_(false), | 
|   70     ignore_set_focus_calls_(false), |   70       ignore_set_focus_calls_(false), | 
|   71     focus_traversable_parent_(NULL), |   71       focus_traversable_parent_(NULL), | 
|   72     focus_traversable_parent_view_(NULL), |   72       focus_traversable_parent_view_(NULL), | 
|   73     drag_view_(NULL) |   73       drag_view_(NULL) | 
|   74 #ifndef NDEBUG |   74 #ifndef NDEBUG | 
|   75     , |   75       , | 
|   76     is_processing_paint_(false) |   76       is_processing_paint_(false) | 
|   77 #endif |   77 #endif | 
|   78 { |   78 { | 
|   79 } |   79 } | 
|   80  |   80  | 
|   81 RootView::~RootView() { |   81 RootView::~RootView() { | 
|   82   // If we have children remove them explicitly so to make sure a remove |   82   // If we have children remove them explicitly so to make sure a remove | 
|   83   // notification is sent for each one of them. |   83   // notification is sent for each one of them. | 
|   84   if (!child_views_.empty()) |   84   if (!child_views_.empty()) | 
|   85     RemoveAllChildViews(true); |   85     RemoveAllChildViews(true); | 
|   86  |   86  | 
| (...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  923   gfx::NativeView native_view = GetWidget()->GetNativeView(); |  923   gfx::NativeView native_view = GetWidget()->GetNativeView(); | 
|  924   if (!native_view) |  924   if (!native_view) | 
|  925     return; |  925     return; | 
|  926   gdk_window_set_cursor(native_view->window, cursor); |  926   gdk_window_set_cursor(native_view->window, cursor); | 
|  927   if (cursor) |  927   if (cursor) | 
|  928     gdk_cursor_destroy(cursor); |  928     gdk_cursor_destroy(cursor); | 
|  929 #endif |  929 #endif | 
|  930 } |  930 } | 
|  931  |  931  | 
|  932 }  // namespace views |  932 }  // namespace views | 
| OLD | NEW |