Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1401)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 292113008: Plumbing for browser process to access text surrounding selection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@adb_install_humans
Patch Set: rebase - use int Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 InternalSwapCompositorFrame(last_frame_info_->output_surface_id, 428 InternalSwapCompositorFrame(last_frame_info_->output_surface_id,
429 last_frame_info_->frame.Pass()); 429 last_frame_info_->frame.Pass());
430 last_frame_info_.reset(); 430 last_frame_info_.reset();
431 } 431 }
432 432
433 if (!is_showing_ && layer_) 433 if (!is_showing_ && layer_)
434 layer_->SetHideLayerAndSubtree(true); 434 layer_->SetHideLayerAndSubtree(true);
435 } 435 }
436 } 436 }
437 437
438 void RenderWidgetHostViewAndroid::OnTextSurroundingSelectionResponse(
439 const base::string16& content,
440 int start_offset,
441 int end_offset) {
442 if (!content_view_core_)
443 return;
444 content_view_core_->OnTextSurroundingSelectionResponse(
445 content, start_offset, end_offset);
446 }
447
438 void RenderWidgetHostViewAndroid::ReleaseLocksOnSurface() { 448 void RenderWidgetHostViewAndroid::ReleaseLocksOnSurface() {
439 if (!frame_evictor_->HasFrame()) { 449 if (!frame_evictor_->HasFrame()) {
440 DCHECK_EQ(locks_on_frame_count_, 0u); 450 DCHECK_EQ(locks_on_frame_count_, 0u);
441 return; 451 return;
442 } 452 }
443 while (locks_on_frame_count_ > 0) { 453 while (locks_on_frame_count_ > 0) {
444 UnlockCompositingSurface(); 454 UnlockCompositingSurface();
445 } 455 }
446 RunAckCallbacks(); 456 RunAckCallbacks();
447 } 457 }
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after
1440 results->availableRect = display.work_area(); 1450 results->availableRect = display.work_area();
1441 results->deviceScaleFactor = display.device_scale_factor(); 1451 results->deviceScaleFactor = display.device_scale_factor();
1442 results->orientationAngle = display.RotationAsDegree(); 1452 results->orientationAngle = display.RotationAsDegree();
1443 gfx::DeviceDisplayInfo info; 1453 gfx::DeviceDisplayInfo info;
1444 results->depth = info.GetBitsPerPixel(); 1454 results->depth = info.GetBitsPerPixel();
1445 results->depthPerComponent = info.GetBitsPerComponent(); 1455 results->depthPerComponent = info.GetBitsPerComponent();
1446 results->isMonochrome = (results->depthPerComponent == 0); 1456 results->isMonochrome = (results->depthPerComponent == 0);
1447 } 1457 }
1448 1458
1449 } // namespace content 1459 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698