| 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 "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| (...skipping 2194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2205 | 2205 |
| 2206 void RenderWidgetHostViewAura::OnBoundsChanged(const gfx::Rect& old_bounds, | 2206 void RenderWidgetHostViewAura::OnBoundsChanged(const gfx::Rect& old_bounds, |
| 2207 const gfx::Rect& new_bounds) { | 2207 const gfx::Rect& new_bounds) { |
| 2208 base::AutoReset<bool> in_bounds_changed(&in_bounds_changed_, true); | 2208 base::AutoReset<bool> in_bounds_changed(&in_bounds_changed_, true); |
| 2209 // We care about this whenever RenderWidgetHostViewAura is not owned by a | 2209 // We care about this whenever RenderWidgetHostViewAura is not owned by a |
| 2210 // WebContentsViewAura since changes to the Window's bounds need to be | 2210 // WebContentsViewAura since changes to the Window's bounds need to be |
| 2211 // messaged to the renderer. WebContentsViewAura invokes SetSize() or | 2211 // messaged to the renderer. WebContentsViewAura invokes SetSize() or |
| 2212 // SetBounds() itself. No matter how we got here, any redundant calls are | 2212 // SetBounds() itself. No matter how we got here, any redundant calls are |
| 2213 // harmless. | 2213 // harmless. |
| 2214 SetSize(new_bounds.size()); | 2214 SetSize(new_bounds.size()); |
| 2215 |
| 2216 if (GetInputMethod()) |
| 2217 GetInputMethod()->OnCaretBoundsChanged(this); |
| 2215 } | 2218 } |
| 2216 | 2219 |
| 2217 gfx::NativeCursor RenderWidgetHostViewAura::GetCursor(const gfx::Point& point) { | 2220 gfx::NativeCursor RenderWidgetHostViewAura::GetCursor(const gfx::Point& point) { |
| 2218 if (mouse_locked_) | 2221 if (mouse_locked_) |
| 2219 return ui::kCursorNone; | 2222 return ui::kCursorNone; |
| 2220 return current_cursor_.GetNativeCursor(); | 2223 return current_cursor_.GetNativeCursor(); |
| 2221 } | 2224 } |
| 2222 | 2225 |
| 2223 int RenderWidgetHostViewAura::GetNonClientComponent( | 2226 int RenderWidgetHostViewAura::GetNonClientComponent( |
| 2224 const gfx::Point& point) const { | 2227 const gfx::Point& point) const { |
| (...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3170 RenderWidgetHost* widget) { | 3173 RenderWidgetHost* widget) { |
| 3171 return new RenderWidgetHostViewAura(widget); | 3174 return new RenderWidgetHostViewAura(widget); |
| 3172 } | 3175 } |
| 3173 | 3176 |
| 3174 // static | 3177 // static |
| 3175 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { | 3178 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 3176 GetScreenInfoForWindow(results, NULL); | 3179 GetScreenInfoForWindow(results, NULL); |
| 3177 } | 3180 } |
| 3178 | 3181 |
| 3179 } // namespace content | 3182 } // namespace content |
| OLD | NEW |