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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
462 } | 462 } |
463 | 463 |
464 void RenderWidgetHostViewAura::OnBoundsChanged(const gfx::Rect& old_bounds, | 464 void RenderWidgetHostViewAura::OnBoundsChanged(const gfx::Rect& old_bounds, |
465 const gfx::Rect& new_bounds) { | 465 const gfx::Rect& new_bounds) { |
466 // We don't care about this one, we are always sized via SetSize() or | 466 // We don't care about this one, we are always sized via SetSize() or |
467 // SetBounds(). | 467 // SetBounds(). |
468 } | 468 } |
469 | 469 |
470 void RenderWidgetHostViewAura::OnFocus() { | 470 void RenderWidgetHostViewAura::OnFocus() { |
471 host_->GotFocus(); | 471 host_->GotFocus(); |
472 host_->SetActive(true); | |
472 } | 473 } |
473 | 474 |
474 void RenderWidgetHostViewAura::OnBlur() { | 475 void RenderWidgetHostViewAura::OnBlur() { |
475 host_->Blur(); | 476 host_->Blur(); |
477 host_->SetActive(false); | |
sky
2011/12/09 18:13:23
gtk/win invoke SetActive(false) before Blur. Make
varunjain
2011/12/09 18:42:58
Done.
| |
476 } | 478 } |
477 | 479 |
478 bool RenderWidgetHostViewAura::OnKeyEvent(aura::KeyEvent* event) { | 480 bool RenderWidgetHostViewAura::OnKeyEvent(aura::KeyEvent* event) { |
479 // We need to handle the Escape key for Pepper Flash. | 481 // We need to handle the Escape key for Pepper Flash. |
480 if (is_fullscreen_ && event->key_code() == ui::VKEY_ESCAPE) { | 482 if (is_fullscreen_ && event->key_code() == ui::VKEY_ESCAPE) { |
481 host_->Shutdown(); | 483 host_->Shutdown(); |
482 } else { | 484 } else { |
483 NativeWebKeyboardEvent webkit_event(event); | 485 NativeWebKeyboardEvent webkit_event(event); |
484 host_->ForwardKeyboardEvent(webkit_event); | 486 host_->ForwardKeyboardEvent(webkit_event); |
485 } | 487 } |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
612 // static | 614 // static |
613 void RenderWidgetHostView::GetDefaultScreenInfo( | 615 void RenderWidgetHostView::GetDefaultScreenInfo( |
614 WebKit::WebScreenInfo* results) { | 616 WebKit::WebScreenInfo* results) { |
615 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize(); | 617 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize(); |
616 results->rect = WebKit::WebRect(0, 0, size.width(), size.height()); | 618 results->rect = WebKit::WebRect(0, 0, size.width(), size.height()); |
617 results->availableRect = results->rect; | 619 results->availableRect = results->rect; |
618 // TODO(derat): Don't hardcode this? | 620 // TODO(derat): Don't hardcode this? |
619 results->depth = 24; | 621 results->depth = 24; |
620 results->depthPerComponent = 8; | 622 results->depthPerComponent = 8; |
621 } | 623 } |
OLD | NEW |