| 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/logging.h" | 8 #include "base/logging.h" |
| 9 #include "content/browser/renderer_host/backing_store_skia.h" | 9 #include "content/browser/renderer_host/backing_store_skia.h" |
| 10 #include "content/browser/renderer_host/image_transport_factory.h" | 10 #include "content/browser/renderer_host/image_transport_factory.h" |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 private: | 112 private: |
| 113 RenderWidgetHostViewAura* view_; | 113 RenderWidgetHostViewAura* view_; |
| 114 | 114 |
| 115 DISALLOW_COPY_AND_ASSIGN(WindowObserver); | 115 DISALLOW_COPY_AND_ASSIGN(WindowObserver); |
| 116 }; | 116 }; |
| 117 | 117 |
| 118 //////////////////////////////////////////////////////////////////////////////// | 118 //////////////////////////////////////////////////////////////////////////////// |
| 119 // RenderWidgetHostViewAura, public: | 119 // RenderWidgetHostViewAura, public: |
| 120 | 120 |
| 121 RenderWidgetHostViewAura::RenderWidgetHostViewAura(RenderWidgetHost* host) | 121 RenderWidgetHostViewAura::RenderWidgetHostViewAura(RenderWidgetHost* host) |
| 122 : ALLOW_THIS_IN_INITIALIZER_LIST(window_(new aura::Window(this))), | 122 : host_(host->AsRWHImpl()), |
| 123 ALLOW_THIS_IN_INITIALIZER_LIST(window_(new aura::Window(this))), |
| 123 is_fullscreen_(false), | 124 is_fullscreen_(false), |
| 124 popup_parent_host_view_(NULL), | 125 popup_parent_host_view_(NULL), |
| 125 popup_child_host_view_(NULL), | 126 popup_child_host_view_(NULL), |
| 126 is_loading_(false), | 127 is_loading_(false), |
| 127 text_input_type_(ui::TEXT_INPUT_TYPE_NONE), | 128 text_input_type_(ui::TEXT_INPUT_TYPE_NONE), |
| 128 can_compose_inline_(true), | 129 can_compose_inline_(true), |
| 129 has_composition_text_(false), | 130 has_composition_text_(false), |
| 130 current_surface_(0), | 131 current_surface_(0), |
| 131 paint_canvas_(NULL), | 132 paint_canvas_(NULL), |
| 132 synthetic_move_sent_(false) { | 133 synthetic_move_sent_(false) { |
| 133 host_ = static_cast<RenderWidgetHostImpl*>(host); | |
| 134 host_->SetView(this); | 134 host_->SetView(this); |
| 135 window_observer_.reset(new WindowObserver(this)); | 135 window_observer_.reset(new WindowObserver(this)); |
| 136 window_->AddObserver(window_observer_.get()); | 136 window_->AddObserver(window_observer_.get()); |
| 137 aura::client::SetTooltipText(window_, &tooltip_); | 137 aura::client::SetTooltipText(window_, &tooltip_); |
| 138 aura::client::SetActivationDelegate(window_, this); | 138 aura::client::SetActivationDelegate(window_, this); |
| 139 } | 139 } |
| 140 | 140 |
| 141 RenderWidgetHostViewAura::~RenderWidgetHostViewAura() { | 141 RenderWidgetHostViewAura::~RenderWidgetHostViewAura() { |
| 142 window_->RemoveObserver(window_observer_.get()); | 142 window_->RemoveObserver(window_observer_.get()); |
| 143 UnlockMouse(); | 143 UnlockMouse(); |
| (...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1049 WebKit::WebScreenInfo* results) { | 1049 WebKit::WebScreenInfo* results) { |
| 1050 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize(); | 1050 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize(); |
| 1051 results->rect = WebKit::WebRect(0, 0, size.width(), size.height()); | 1051 results->rect = WebKit::WebRect(0, 0, size.width(), size.height()); |
| 1052 results->availableRect = results->rect; | 1052 results->availableRect = results->rect; |
| 1053 // TODO(derat): Don't hardcode this? | 1053 // TODO(derat): Don't hardcode this? |
| 1054 results->depth = 24; | 1054 results->depth = 24; |
| 1055 results->depthPerComponent = 8; | 1055 results->depthPerComponent = 8; |
| 1056 results->verticalDPI = 96; | 1056 results->verticalDPI = 96; |
| 1057 results->horizontalDPI = 96; | 1057 results->horizontalDPI = 96; |
| 1058 } | 1058 } |
| OLD | NEW |