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/renderer/pepper/pepper_plugin_instance_impl.h" | 5 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bit_cast.h" | 10 #include "base/bit_cast.h" |
(...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1399 bound_compositor_->ViewInitiatedPaint(); | 1399 bound_compositor_->ViewInitiatedPaint(); |
1400 } | 1400 } |
1401 | 1401 |
1402 void PepperPluginInstanceImpl::SetSelectedText( | 1402 void PepperPluginInstanceImpl::SetSelectedText( |
1403 const base::string16& selected_text) { | 1403 const base::string16& selected_text) { |
1404 if (!render_frame_) | 1404 if (!render_frame_) |
1405 return; | 1405 return; |
1406 | 1406 |
1407 selected_text_ = selected_text; | 1407 selected_text_ = selected_text; |
1408 gfx::Range range(0, selected_text.length()); | 1408 gfx::Range range(0, selected_text.length()); |
1409 render_frame_->SetSelectedText(selected_text, 0, range); | 1409 render_frame_->SetSelectedText(selected_text, 0, range, true); |
1410 } | 1410 } |
1411 | 1411 |
1412 void PepperPluginInstanceImpl::SetLinkUnderCursor(const std::string& url) { | 1412 void PepperPluginInstanceImpl::SetLinkUnderCursor(const std::string& url) { |
1413 link_under_cursor_ = base::UTF8ToUTF16(url); | 1413 link_under_cursor_ = base::UTF8ToUTF16(url); |
1414 } | 1414 } |
1415 | 1415 |
1416 void PepperPluginInstanceImpl::SetTextInputType(ui::TextInputType type) { | 1416 void PepperPluginInstanceImpl::SetTextInputType(ui::TextInputType type) { |
1417 if (!render_frame_) | 1417 if (!render_frame_) |
1418 return; | 1418 return; |
1419 | 1419 |
(...skipping 2070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3490 const cc::TextureMailbox& mailbox) const { | 3490 const cc::TextureMailbox& mailbox) const { |
3491 auto it = | 3491 auto it = |
3492 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(), | 3492 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(), |
3493 [&mailbox](const TextureMailboxRefCount& ref_count) { | 3493 [&mailbox](const TextureMailboxRefCount& ref_count) { |
3494 return ref_count.first.mailbox() == mailbox.mailbox(); | 3494 return ref_count.first.mailbox() == mailbox.mailbox(); |
3495 }); | 3495 }); |
3496 return it != texture_ref_counts_.end(); | 3496 return it != texture_ref_counts_.end(); |
3497 } | 3497 } |
3498 | 3498 |
3499 } // namespace content | 3499 } // namespace content |
OLD | NEW |