| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 mouse_move_handler_ = NULL; | 429 mouse_move_handler_ = NULL; |
| 430 #if defined(TOUCH_UI) | 430 #if defined(TOUCH_UI) |
| 431 if (touch_pressed_handler_) | 431 if (touch_pressed_handler_) |
| 432 touch_pressed_handler_ = NULL; | 432 touch_pressed_handler_ = NULL; |
| 433 #endif | 433 #endif |
| 434 } | 434 } |
| 435 } | 435 } |
| 436 | 436 |
| 437 | 437 |
| 438 void RootView::OnPaint(gfx::Canvas* canvas) { | 438 void RootView::OnPaint(gfx::Canvas* canvas) { |
| 439 canvas->AsCanvasSkia()->drawColor(SK_ColorBLACK, SkXfermode::kClear_Mode); | 439 canvas->AsCanvasSkia()->skia_canvas()->drawColor( |
| 440 SK_ColorBLACK, SkXfermode::kClear_Mode); |
| 440 } | 441 } |
| 441 | 442 |
| 442 //////////////////////////////////////////////////////////////////////////////// | 443 //////////////////////////////////////////////////////////////////////////////// |
| 443 // RootView, private: | 444 // RootView, private: |
| 444 | 445 |
| 445 // Coordinate conversion ------------------------------------------------------- | 446 // Coordinate conversion ------------------------------------------------------- |
| 446 | 447 |
| 447 bool RootView::ConvertPointToMouseHandler(const gfx::Point& l, gfx::Point* p) { | 448 bool RootView::ConvertPointToMouseHandler(const gfx::Point& l, gfx::Point* p) { |
| 448 // If the mouse_handler was set explicitly, keep sending events even if it was | 449 // If the mouse_handler was set explicitly, keep sending events even if it was |
| 449 // re-parented in a different window. (a non explicit mouse handler is | 450 // re-parented in a different window. (a non explicit mouse handler is |
| (...skipping 23 matching lines...) Expand all Loading... |
| 473 widget_->SetCursor(cursor); | 474 widget_->SetCursor(cursor); |
| 474 } | 475 } |
| 475 | 476 |
| 476 void RootView::SetMouseLocationAndFlags(const MouseEvent& event) { | 477 void RootView::SetMouseLocationAndFlags(const MouseEvent& event) { |
| 477 last_mouse_event_flags_ = event.flags(); | 478 last_mouse_event_flags_ = event.flags(); |
| 478 last_mouse_event_x_ = event.x(); | 479 last_mouse_event_x_ = event.x(); |
| 479 last_mouse_event_y_ = event.y(); | 480 last_mouse_event_y_ = event.y(); |
| 480 } | 481 } |
| 481 | 482 |
| 482 } // namespace views | 483 } // namespace views |
| OLD | NEW |