| 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_android.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_android.h" |
| 6 | 6 |
| 7 #include <android/bitmap.h> | 7 #include <android/bitmap.h> |
| 8 | 8 |
| 9 #include "base/android/sys_utils.h" | 9 #include "base/android/sys_utils.h" |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 } | 248 } |
| 249 | 249 |
| 250 void RenderWidgetHostViewAndroid::WasShown() { | 250 void RenderWidgetHostViewAndroid::WasShown() { |
| 251 if (!host_ || !host_->is_hidden()) | 251 if (!host_ || !host_->is_hidden()) |
| 252 return; | 252 return; |
| 253 | 253 |
| 254 host_->WasShown(); | 254 host_->WasShown(); |
| 255 | 255 |
| 256 if (content_view_core_ && !using_synchronous_compositor_) { | 256 if (content_view_core_ && !using_synchronous_compositor_) { |
| 257 content_view_core_->GetWindowAndroid()->AddObserver(this); | 257 content_view_core_->GetWindowAndroid()->AddObserver(this); |
| 258 content_view_core_->GetWindowAndroid()->RequestVSyncUpdate(); |
| 258 observing_root_window_ = true; | 259 observing_root_window_ = true; |
| 259 } | 260 } |
| 260 } | 261 } |
| 261 | 262 |
| 262 void RenderWidgetHostViewAndroid::WasHidden() { | 263 void RenderWidgetHostViewAndroid::WasHidden() { |
| 263 RunAckCallbacks(); | 264 RunAckCallbacks(); |
| 264 | 265 |
| 265 if (!host_ || host_->is_hidden()) | 266 if (!host_ || host_->is_hidden()) |
| 266 return; | 267 return; |
| 267 | 268 |
| (...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1454 results->availableRect = display.work_area(); | 1455 results->availableRect = display.work_area(); |
| 1455 results->deviceScaleFactor = display.device_scale_factor(); | 1456 results->deviceScaleFactor = display.device_scale_factor(); |
| 1456 results->orientationAngle = display.RotationAsDegree(); | 1457 results->orientationAngle = display.RotationAsDegree(); |
| 1457 gfx::DeviceDisplayInfo info; | 1458 gfx::DeviceDisplayInfo info; |
| 1458 results->depth = info.GetBitsPerPixel(); | 1459 results->depth = info.GetBitsPerPixel(); |
| 1459 results->depthPerComponent = info.GetBitsPerComponent(); | 1460 results->depthPerComponent = info.GetBitsPerComponent(); |
| 1460 results->isMonochrome = (results->depthPerComponent == 0); | 1461 results->isMonochrome = (results->depthPerComponent == 0); |
| 1461 } | 1462 } |
| 1462 | 1463 |
| 1463 } // namespace content | 1464 } // namespace content |
| OLD | NEW |