| 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 "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/logging.h" | 7 #include "base/logging.h" |
| 8 #include "content/browser/renderer_host/backing_store_skia.h" | 8 #include "content/browser/renderer_host/backing_store_skia.h" |
| 9 #include "content/browser/renderer_host/render_widget_host.h" | 9 #include "content/browser/renderer_host/render_widget_host.h" |
| 10 #include "content/browser/renderer_host/web_input_event_aura.h" | 10 #include "content/browser/renderer_host/web_input_event_aura.h" |
| (...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 } | 467 } |
| 468 | 468 |
| 469 void RenderWidgetHostViewAura::OnBoundsChanged(const gfx::Rect& old_bounds, | 469 void RenderWidgetHostViewAura::OnBoundsChanged(const gfx::Rect& old_bounds, |
| 470 const gfx::Rect& new_bounds) { | 470 const gfx::Rect& new_bounds) { |
| 471 // We don't care about this one, we are always sized via SetSize() or | 471 // We don't care about this one, we are always sized via SetSize() or |
| 472 // SetBounds(). | 472 // SetBounds(). |
| 473 } | 473 } |
| 474 | 474 |
| 475 void RenderWidgetHostViewAura::OnFocus() { | 475 void RenderWidgetHostViewAura::OnFocus() { |
| 476 host_->GotFocus(); | 476 host_->GotFocus(); |
| 477 host_->SetActive(true); |
| 477 } | 478 } |
| 478 | 479 |
| 479 void RenderWidgetHostViewAura::OnBlur() { | 480 void RenderWidgetHostViewAura::OnBlur() { |
| 481 host_->SetActive(false); |
| 480 host_->Blur(); | 482 host_->Blur(); |
| 481 } | 483 } |
| 482 | 484 |
| 483 bool RenderWidgetHostViewAura::OnKeyEvent(aura::KeyEvent* event) { | 485 bool RenderWidgetHostViewAura::OnKeyEvent(aura::KeyEvent* event) { |
| 484 // We need to handle the Escape key for Pepper Flash. | 486 // We need to handle the Escape key for Pepper Flash. |
| 485 if (is_fullscreen_ && event->key_code() == ui::VKEY_ESCAPE) { | 487 if (is_fullscreen_ && event->key_code() == ui::VKEY_ESCAPE) { |
| 486 host_->Shutdown(); | 488 host_->Shutdown(); |
| 487 } else { | 489 } else { |
| 488 NativeWebKeyboardEvent webkit_event(event); | 490 NativeWebKeyboardEvent webkit_event(event); |
| 489 host_->ForwardKeyboardEvent(webkit_event); | 491 host_->ForwardKeyboardEvent(webkit_event); |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 // static | 619 // static |
| 618 void RenderWidgetHostView::GetDefaultScreenInfo( | 620 void RenderWidgetHostView::GetDefaultScreenInfo( |
| 619 WebKit::WebScreenInfo* results) { | 621 WebKit::WebScreenInfo* results) { |
| 620 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize(); | 622 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize(); |
| 621 results->rect = WebKit::WebRect(0, 0, size.width(), size.height()); | 623 results->rect = WebKit::WebRect(0, 0, size.width(), size.height()); |
| 622 results->availableRect = results->rect; | 624 results->availableRect = results->rect; |
| 623 // TODO(derat): Don't hardcode this? | 625 // TODO(derat): Don't hardcode this? |
| 624 results->depth = 24; | 626 results->depth = 24; |
| 625 results->depthPerComponent = 8; | 627 results->depthPerComponent = 8; |
| 626 } | 628 } |
| OLD | NEW |