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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 | 430 |
431 if (!is_showing_ && layer_) | 431 if (!is_showing_ && layer_) |
432 layer_->SetHideLayerAndSubtree(true); | 432 layer_->SetHideLayerAndSubtree(true); |
433 } | 433 } |
434 } | 434 } |
435 | 435 |
436 void RenderWidgetHostViewAndroid::OnTextSurroundingSelectionResponse( | 436 void RenderWidgetHostViewAndroid::OnTextSurroundingSelectionResponse( |
437 const base::string16& content, | 437 const base::string16& content, |
438 size_t start_offset, | 438 size_t start_offset, |
439 size_t end_offset) { | 439 size_t end_offset) { |
| 440 if (!content_view_core_) |
| 441 return; |
| 442 content_view_core_->OnTextSurroundingSelectionResponse( |
| 443 content, start_offset, end_offset); |
440 } | 444 } |
441 | 445 |
442 void RenderWidgetHostViewAndroid::ReleaseLocksOnSurface() { | 446 void RenderWidgetHostViewAndroid::ReleaseLocksOnSurface() { |
443 if (!frame_evictor_->HasFrame()) { | 447 if (!frame_evictor_->HasFrame()) { |
444 DCHECK_EQ(locks_on_frame_count_, 0u); | 448 DCHECK_EQ(locks_on_frame_count_, 0u); |
445 return; | 449 return; |
446 } | 450 } |
447 while (locks_on_frame_count_ > 0) { | 451 while (locks_on_frame_count_ > 0) { |
448 UnlockCompositingSurface(); | 452 UnlockCompositingSurface(); |
449 } | 453 } |
(...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1436 results->availableRect = display.work_area(); | 1440 results->availableRect = display.work_area(); |
1437 results->deviceScaleFactor = display.device_scale_factor(); | 1441 results->deviceScaleFactor = display.device_scale_factor(); |
1438 results->orientationAngle = display.RotationAsDegree(); | 1442 results->orientationAngle = display.RotationAsDegree(); |
1439 gfx::DeviceDisplayInfo info; | 1443 gfx::DeviceDisplayInfo info; |
1440 results->depth = info.GetBitsPerPixel(); | 1444 results->depth = info.GetBitsPerPixel(); |
1441 results->depthPerComponent = info.GetBitsPerComponent(); | 1445 results->depthPerComponent = info.GetBitsPerComponent(); |
1442 results->isMonochrome = (results->depthPerComponent == 0); | 1446 results->isMonochrome = (results->depthPerComponent == 0); |
1443 } | 1447 } |
1444 | 1448 |
1445 } // namespace content | 1449 } // namespace content |
OLD | NEW |