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 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 RemoveLayers(); | 517 RemoveLayers(); |
518 SetContentViewCore(NULL); | 518 SetContentViewCore(NULL); |
519 | 519 |
520 // The RenderWidgetHost's destruction led here, so don't call it. | 520 // The RenderWidgetHost's destruction led here, so don't call it. |
521 host_ = NULL; | 521 host_ = NULL; |
522 | 522 |
523 delete this; | 523 delete this; |
524 } | 524 } |
525 | 525 |
526 void RenderWidgetHostViewAndroid::SetTooltipText( | 526 void RenderWidgetHostViewAndroid::SetTooltipText( |
527 const string16& tooltip_text) { | 527 const base::string16& tooltip_text) { |
528 // Tooltips don't makes sense on Android. | 528 // Tooltips don't makes sense on Android. |
529 } | 529 } |
530 | 530 |
531 void RenderWidgetHostViewAndroid::SelectionChanged(const string16& text, | 531 void RenderWidgetHostViewAndroid::SelectionChanged(const base::string16& text, |
532 size_t offset, | 532 size_t offset, |
533 const gfx::Range& range) { | 533 const gfx::Range& range) { |
534 RenderWidgetHostViewBase::SelectionChanged(text, offset, range); | 534 RenderWidgetHostViewBase::SelectionChanged(text, offset, range); |
535 | 535 |
536 if (text.empty() || range.is_empty() || !content_view_core_) | 536 if (text.empty() || range.is_empty() || !content_view_core_) |
537 return; | 537 return; |
538 size_t pos = range.GetMin() - offset; | 538 size_t pos = range.GetMin() - offset; |
539 size_t n = range.length(); | 539 size_t n = range.length(); |
540 | 540 |
541 DCHECK(pos + n <= text.length()) << "The text can not fully cover range."; | 541 DCHECK(pos + n <= text.length()) << "The text can not fully cover range."; |
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1380 // RenderWidgetHostView, public: | 1380 // RenderWidgetHostView, public: |
1381 | 1381 |
1382 // static | 1382 // static |
1383 RenderWidgetHostView* | 1383 RenderWidgetHostView* |
1384 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { | 1384 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { |
1385 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); | 1385 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); |
1386 return new RenderWidgetHostViewAndroid(rwhi, NULL); | 1386 return new RenderWidgetHostViewAndroid(rwhi, NULL); |
1387 } | 1387 } |
1388 | 1388 |
1389 } // namespace content | 1389 } // namespace content |
OLD | NEW |