| 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/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 NOTIMPLEMENTED(); | 331 NOTIMPLEMENTED(); |
| 332 return static_cast<gfx::NativeViewAccessible>(NULL); | 332 return static_cast<gfx::NativeViewAccessible>(NULL); |
| 333 } | 333 } |
| 334 | 334 |
| 335 void RenderWidgetHostViewAura::MovePluginWindows( | 335 void RenderWidgetHostViewAura::MovePluginWindows( |
| 336 const std::vector<webkit::npapi::WebPluginGeometry>& moves) { | 336 const std::vector<webkit::npapi::WebPluginGeometry>& moves) { |
| 337 // We don't support windowed plugins. | 337 // We don't support windowed plugins. |
| 338 } | 338 } |
| 339 | 339 |
| 340 void RenderWidgetHostViewAura::Focus() { | 340 void RenderWidgetHostViewAura::Focus() { |
| 341 window_->Focus(); | 341 // Make sure we have a FocusManager before attempting to Focus(). In some |
| 342 // situations we may not yet be in a valid Window hierarchy (such as reloading |
| 343 // after out of memory discared the tab). |
| 344 if (window_->GetFocusManager()) |
| 345 window_->Focus(); |
| 342 } | 346 } |
| 343 | 347 |
| 344 void RenderWidgetHostViewAura::Blur() { | 348 void RenderWidgetHostViewAura::Blur() { |
| 345 window_->Blur(); | 349 window_->Blur(); |
| 346 } | 350 } |
| 347 | 351 |
| 348 bool RenderWidgetHostViewAura::HasFocus() const { | 352 bool RenderWidgetHostViewAura::HasFocus() const { |
| 349 return window_->HasFocus(); | 353 return window_->HasFocus(); |
| 350 } | 354 } |
| 351 | 355 |
| (...skipping 1299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1651 RenderWidgetHost* widget) { | 1655 RenderWidgetHost* widget) { |
| 1652 return new RenderWidgetHostViewAura(widget); | 1656 return new RenderWidgetHostViewAura(widget); |
| 1653 } | 1657 } |
| 1654 | 1658 |
| 1655 // static | 1659 // static |
| 1656 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { | 1660 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 1657 GetScreenInfoForWindow(results, NULL); | 1661 GetScreenInfoForWindow(results, NULL); |
| 1658 } | 1662 } |
| 1659 | 1663 |
| 1660 } // namespace content | 1664 } // namespace content |
| OLD | NEW |