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 1364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1375 else if (bound_graphics_3d_.get()) | 1375 else if (bound_graphics_3d_.get()) |
1376 bound_graphics_3d_->ViewInitiatedPaint(); | 1376 bound_graphics_3d_->ViewInitiatedPaint(); |
1377 else if (bound_compositor_) | 1377 else if (bound_compositor_) |
1378 bound_compositor_->ViewInitiatedPaint(); | 1378 bound_compositor_->ViewInitiatedPaint(); |
1379 } | 1379 } |
1380 | 1380 |
1381 void PepperPluginInstanceImpl::SetSelectedText( | 1381 void PepperPluginInstanceImpl::SetSelectedText( |
1382 const base::string16& selected_text) { | 1382 const base::string16& selected_text) { |
1383 selected_text_ = selected_text; | 1383 selected_text_ = selected_text; |
1384 gfx::Range range(0, selected_text.length()); | 1384 gfx::Range range(0, selected_text.length()); |
1385 render_frame_->SetSelectedText(selected_text, 0, range); | 1385 render_frame_->SetSelectedText(selected_text, 0, range, true); |
nasko
2017/05/04 16:10:24
Is it not possible for script running in a plugin
Peter Varga
2017/05/04 16:33:45
I suppose it is possible but I wanted to keep the
| |
1386 } | 1386 } |
1387 | 1387 |
1388 void PepperPluginInstanceImpl::SetLinkUnderCursor(const std::string& url) { | 1388 void PepperPluginInstanceImpl::SetLinkUnderCursor(const std::string& url) { |
1389 link_under_cursor_ = base::UTF8ToUTF16(url); | 1389 link_under_cursor_ = base::UTF8ToUTF16(url); |
1390 } | 1390 } |
1391 | 1391 |
1392 void PepperPluginInstanceImpl::SetTextInputType(ui::TextInputType type) { | 1392 void PepperPluginInstanceImpl::SetTextInputType(ui::TextInputType type) { |
1393 text_input_type_ = type; | 1393 text_input_type_ = type; |
1394 render_frame_->PepperTextInputTypeChanged(this); | 1394 render_frame_->PepperTextInputTypeChanged(this); |
1395 } | 1395 } |
(...skipping 2059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3455 const cc::TextureMailbox& mailbox) const { | 3455 const cc::TextureMailbox& mailbox) const { |
3456 auto it = | 3456 auto it = |
3457 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(), | 3457 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(), |
3458 [&mailbox](const TextureMailboxRefCount& ref_count) { | 3458 [&mailbox](const TextureMailboxRefCount& ref_count) { |
3459 return ref_count.first.mailbox() == mailbox.mailbox(); | 3459 return ref_count.first.mailbox() == mailbox.mailbox(); |
3460 }); | 3460 }); |
3461 return it != texture_ref_counts_.end(); | 3461 return it != texture_ref_counts_.end(); |
3462 } | 3462 } |
3463 | 3463 |
3464 } // namespace content | 3464 } // namespace content |
OLD | NEW |