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/npapi/webplugin_delegate_proxy.h" | 5 #include "content/renderer/npapi/webplugin_delegate_proxy.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <utility> |
10 | 11 |
11 #include "base/auto_reset.h" | 12 #include "base/auto_reset.h" |
12 #include "base/command_line.h" | 13 #include "base/command_line.h" |
13 #include "base/files/file_util.h" | 14 #include "base/files/file_util.h" |
14 #include "base/logging.h" | 15 #include "base/logging.h" |
15 #include "base/macros.h" | 16 #include "base/macros.h" |
16 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
17 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
18 #include "base/process/process.h" | 19 #include "base/process/process.h" |
19 #include "base/strings/string_split.h" | 20 #include "base/strings/string_split.h" |
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 dummy_activation_window_ = dummy_activation_window; | 745 dummy_activation_window_ = dummy_activation_window; |
745 render_view_->Send(new ViewHostMsg_WindowlessPluginDummyWindowCreated( | 746 render_view_->Send(new ViewHostMsg_WindowlessPluginDummyWindowCreated( |
746 render_view_->GetRoutingID(), dummy_activation_window_)); | 747 render_view_->GetRoutingID(), dummy_activation_window_)); |
747 | 748 |
748 // Bug 25583: this can be null because some "virus scanners" block the | 749 // Bug 25583: this can be null because some "virus scanners" block the |
749 // DuplicateHandle call in the plugin process. | 750 // DuplicateHandle call in the plugin process. |
750 if (!modal_loop_pump_messages_event.IsValid()) | 751 if (!modal_loop_pump_messages_event.IsValid()) |
751 return; | 752 return; |
752 | 753 |
753 modal_loop_pump_messages_event_.reset( | 754 modal_loop_pump_messages_event_.reset( |
754 new base::WaitableEvent(modal_loop_pump_messages_event.Pass())); | 755 new base::WaitableEvent(std::move(modal_loop_pump_messages_event))); |
755 } | 756 } |
756 | 757 |
757 void WebPluginDelegateProxy::OnNotifyIMEStatus(int input_type, | 758 void WebPluginDelegateProxy::OnNotifyIMEStatus(int input_type, |
758 const gfx::Rect& caret_rect) { | 759 const gfx::Rect& caret_rect) { |
759 if (!render_view_) | 760 if (!render_view_) |
760 return; | 761 return; |
761 | 762 |
762 ViewHostMsg_TextInputState_Params params; | 763 ViewHostMsg_TextInputState_Params params; |
763 params.type = static_cast<ui::TextInputType>(input_type); | 764 params.type = static_cast<ui::TextInputType>(input_type); |
764 params.mode = ui::TEXT_INPUT_MODE_DEFAULT; | 765 params.mode = ui::TEXT_INPUT_MODE_DEFAULT; |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
970 index->mime_type == "application/x-vnd.movenetworks.qm" || | 971 index->mime_type == "application/x-vnd.movenetworks.qm" || |
971 index->mime_type == "application/x-vnd.mnplayer.qm") { | 972 index->mime_type == "application/x-vnd.mnplayer.qm") { |
972 return true; | 973 return true; |
973 } | 974 } |
974 } | 975 } |
975 return false; | 976 return false; |
976 } | 977 } |
977 #endif | 978 #endif |
978 | 979 |
979 } // namespace content | 980 } // namespace content |
OLD | NEW |