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/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 delete this; | 504 delete this; |
505 } | 505 } |
506 | 506 |
507 void RenderWidgetHostViewAndroid::SetTooltipText( | 507 void RenderWidgetHostViewAndroid::SetTooltipText( |
508 const string16& tooltip_text) { | 508 const string16& tooltip_text) { |
509 // Tooltips don't makes sense on Android. | 509 // Tooltips don't makes sense on Android. |
510 } | 510 } |
511 | 511 |
512 void RenderWidgetHostViewAndroid::SelectionChanged(const string16& text, | 512 void RenderWidgetHostViewAndroid::SelectionChanged(const string16& text, |
513 size_t offset, | 513 size_t offset, |
514 const ui::Range& range) { | 514 const gfx::Range& range) { |
515 RenderWidgetHostViewBase::SelectionChanged(text, offset, range); | 515 RenderWidgetHostViewBase::SelectionChanged(text, offset, range); |
516 | 516 |
517 if (text.empty() || range.is_empty() || !content_view_core_) | 517 if (text.empty() || range.is_empty() || !content_view_core_) |
518 return; | 518 return; |
519 size_t pos = range.GetMin() - offset; | 519 size_t pos = range.GetMin() - offset; |
520 size_t n = range.length(); | 520 size_t n = range.length(); |
521 | 521 |
522 DCHECK(pos + n <= text.length()) << "The text can not fully cover range."; | 522 DCHECK(pos + n <= text.length()) << "The text can not fully cover range."; |
523 if (pos >= text.length()) { | 523 if (pos >= text.length()) { |
524 NOTREACHED() << "The text can not cover range."; | 524 NOTREACHED() << "The text can not cover range."; |
(...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1288 // RenderWidgetHostView, public: | 1288 // RenderWidgetHostView, public: |
1289 | 1289 |
1290 // static | 1290 // static |
1291 RenderWidgetHostView* | 1291 RenderWidgetHostView* |
1292 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { | 1292 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { |
1293 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); | 1293 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); |
1294 return new RenderWidgetHostViewAndroid(rwhi, NULL); | 1294 return new RenderWidgetHostViewAndroid(rwhi, NULL); |
1295 } | 1295 } |
1296 | 1296 |
1297 } // namespace content | 1297 } // namespace content |
OLD | NEW |