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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 ALLOW_THIS_IN_INITIALIZER_LIST(window_(new aura::Window(this))), | 93 ALLOW_THIS_IN_INITIALIZER_LIST(window_(new aura::Window(this))), |
94 is_fullscreen_(false), | 94 is_fullscreen_(false), |
95 popup_parent_host_view_(NULL), | 95 popup_parent_host_view_(NULL), |
96 is_loading_(false), | 96 is_loading_(false), |
97 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) | 97 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) |
98 current_surface_(gfx::kNullPluginWindow), | 98 current_surface_(gfx::kNullPluginWindow), |
99 #endif | 99 #endif |
100 skip_schedule_paint_(false) { | 100 skip_schedule_paint_(false) { |
101 host_->SetView(this); | 101 host_->SetView(this); |
102 window_->SetProperty(aura::kTooltipTextKey, &tooltip_); | 102 window_->SetProperty(aura::kTooltipTextKey, &tooltip_); |
103 aura::ActivationDelegate::SetActivationDelegate(window_, this); | 103 aura::client::SetActivationDelegate(window_, this); |
104 } | 104 } |
105 | 105 |
106 RenderWidgetHostViewAura::~RenderWidgetHostViewAura() { | 106 RenderWidgetHostViewAura::~RenderWidgetHostViewAura() { |
107 } | 107 } |
108 | 108 |
109 void RenderWidgetHostViewAura::InitAsChild() { | 109 void RenderWidgetHostViewAura::InitAsChild() { |
110 window_->Init(ui::Layer::LAYER_HAS_TEXTURE); | 110 window_->Init(ui::Layer::LAYER_HAS_TEXTURE); |
111 window_->SetName("RenderWidgetHostViewAura"); | 111 window_->SetName("RenderWidgetHostViewAura"); |
112 } | 112 } |
113 | 113 |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 | 572 |
573 void RenderWidgetHostViewAura::OnWindowDestroyed() { | 573 void RenderWidgetHostViewAura::OnWindowDestroyed() { |
574 host_->ViewDestroyed(); | 574 host_->ViewDestroyed(); |
575 delete this; | 575 delete this; |
576 } | 576 } |
577 | 577 |
578 void RenderWidgetHostViewAura::OnWindowVisibilityChanged(bool visible) { | 578 void RenderWidgetHostViewAura::OnWindowVisibilityChanged(bool visible) { |
579 } | 579 } |
580 | 580 |
581 //////////////////////////////////////////////////////////////////////////////// | 581 //////////////////////////////////////////////////////////////////////////////// |
582 // RenderWidgetHostViewAura, aura::ActivationDelegate implementation: | 582 // RenderWidgetHostViewAura, aura::client::ActivationDelegate implementation: |
583 | 583 |
584 bool RenderWidgetHostViewAura::ShouldActivate(aura::Event* event) { | 584 bool RenderWidgetHostViewAura::ShouldActivate(aura::Event* event) { |
585 return false; | 585 return false; |
586 } | 586 } |
587 | 587 |
588 void RenderWidgetHostViewAura::OnActivated() { | 588 void RenderWidgetHostViewAura::OnActivated() { |
589 } | 589 } |
590 | 590 |
591 void RenderWidgetHostViewAura::OnLostActive() { | 591 void RenderWidgetHostViewAura::OnLostActive() { |
592 } | 592 } |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 // static | 628 // static |
629 void RenderWidgetHostView::GetDefaultScreenInfo( | 629 void RenderWidgetHostView::GetDefaultScreenInfo( |
630 WebKit::WebScreenInfo* results) { | 630 WebKit::WebScreenInfo* results) { |
631 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize(); | 631 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize(); |
632 results->rect = WebKit::WebRect(0, 0, size.width(), size.height()); | 632 results->rect = WebKit::WebRect(0, 0, size.width(), size.height()); |
633 results->availableRect = results->rect; | 633 results->availableRect = results->rect; |
634 // TODO(derat): Don't hardcode this? | 634 // TODO(derat): Don't hardcode this? |
635 results->depth = 24; | 635 results->depth = 24; |
636 results->depthPerComponent = 8; | 636 results->depthPerComponent = 8; |
637 } | 637 } |
OLD | NEW |