| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/renderer_host/render_widget_host_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 1483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1494 // SetBounds() itself. No matter how we got here, any redundant calls are | 1494 // SetBounds() itself. No matter how we got here, any redundant calls are |
| 1495 // harmless. | 1495 // harmless. |
| 1496 SetSize(new_bounds.size()); | 1496 SetSize(new_bounds.size()); |
| 1497 | 1497 |
| 1498 if (GetInputMethod()) | 1498 if (GetInputMethod()) |
| 1499 GetInputMethod()->OnCaretBoundsChanged(this); | 1499 GetInputMethod()->OnCaretBoundsChanged(this); |
| 1500 } | 1500 } |
| 1501 | 1501 |
| 1502 gfx::NativeCursor RenderWidgetHostViewAura::GetCursor(const gfx::Point& point) { | 1502 gfx::NativeCursor RenderWidgetHostViewAura::GetCursor(const gfx::Point& point) { |
| 1503 if (mouse_locked_) | 1503 if (mouse_locked_) |
| 1504 return ui::kCursorNone; | 1504 return ui::CursorType::kNone; |
| 1505 return current_cursor_.GetNativeCursor(); | 1505 return current_cursor_.GetNativeCursor(); |
| 1506 } | 1506 } |
| 1507 | 1507 |
| 1508 int RenderWidgetHostViewAura::GetNonClientComponent( | 1508 int RenderWidgetHostViewAura::GetNonClientComponent( |
| 1509 const gfx::Point& point) const { | 1509 const gfx::Point& point) const { |
| 1510 return HTCLIENT; | 1510 return HTCLIENT; |
| 1511 } | 1511 } |
| 1512 | 1512 |
| 1513 bool RenderWidgetHostViewAura::ShouldDescendIntoChildForEventHandling( | 1513 bool RenderWidgetHostViewAura::ShouldDescendIntoChildForEventHandling( |
| 1514 aura::Window* child, | 1514 aura::Window* child, |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2002 if (screen_position_client) { | 2002 if (screen_position_client) { |
| 2003 screen_position_client->ConvertPointFromScreen( | 2003 screen_position_client->ConvertPointFromScreen( |
| 2004 root_window, &root_window_point); | 2004 root_window, &root_window_point); |
| 2005 } | 2005 } |
| 2006 | 2006 |
| 2007 if (root_window->GetEventHandlerForPoint(root_window_point) != window_) | 2007 if (root_window->GetEventHandlerForPoint(root_window_point) != window_) |
| 2008 return; | 2008 return; |
| 2009 | 2009 |
| 2010 gfx::NativeCursor cursor = current_cursor_.GetNativeCursor(); | 2010 gfx::NativeCursor cursor = current_cursor_.GetNativeCursor(); |
| 2011 // Do not show loading cursor when the cursor is currently hidden. | 2011 // Do not show loading cursor when the cursor is currently hidden. |
| 2012 if (is_loading_ && cursor != ui::kCursorNone) | 2012 if (is_loading_ && cursor != ui::CursorType::kNone) |
| 2013 cursor = ui::kCursorPointer; | 2013 cursor = ui::Cursor(ui::CursorType::kPointer); |
| 2014 | 2014 |
| 2015 aura::client::CursorClient* cursor_client = | 2015 aura::client::CursorClient* cursor_client = |
| 2016 aura::client::GetCursorClient(root_window); | 2016 aura::client::GetCursorClient(root_window); |
| 2017 if (cursor_client) { | 2017 if (cursor_client) { |
| 2018 cursor_client->SetCursor(cursor); | 2018 cursor_client->SetCursor(cursor); |
| 2019 } | 2019 } |
| 2020 } | 2020 } |
| 2021 | 2021 |
| 2022 ui::InputMethod* RenderWidgetHostViewAura::GetInputMethod() const { | 2022 ui::InputMethod* RenderWidgetHostViewAura::GetInputMethod() const { |
| 2023 if (!window_) | 2023 if (!window_) |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2377 } | 2377 } |
| 2378 | 2378 |
| 2379 void RenderWidgetHostViewAura::UpdateNeedsBeginFramesInternal() { | 2379 void RenderWidgetHostViewAura::UpdateNeedsBeginFramesInternal() { |
| 2380 if (!delegated_frame_host_) | 2380 if (!delegated_frame_host_) |
| 2381 return; | 2381 return; |
| 2382 delegated_frame_host_->SetNeedsBeginFrames(needs_begin_frames_ || | 2382 delegated_frame_host_->SetNeedsBeginFrames(needs_begin_frames_ || |
| 2383 needs_flush_input_); | 2383 needs_flush_input_); |
| 2384 } | 2384 } |
| 2385 | 2385 |
| 2386 } // namespace content | 2386 } // namespace content |
| OLD | NEW |