OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1387 if (client) { | 1387 if (client) { |
1388 client->OnMenuClosed(custom_context.request_id); | 1388 client->OnMenuClosed(custom_context.request_id); |
1389 pending_context_menus_.Remove(custom_context.request_id); | 1389 pending_context_menus_.Remove(custom_context.request_id); |
1390 } | 1390 } |
1391 } else { | 1391 } else { |
1392 if (custom_context.link_followed.is_valid()) | 1392 if (custom_context.link_followed.is_valid()) |
1393 frame_->sendPings(context_menu_node_, custom_context.link_followed); | 1393 frame_->sendPings(context_menu_node_, custom_context.link_followed); |
1394 // Internal request, forward to WebKit. | 1394 // Internal request, forward to WebKit. |
1395 context_menu_node_.reset(); | 1395 context_menu_node_.reset(); |
1396 } | 1396 } |
| 1397 |
| 1398 render_view()->webview()->didCloseContextMenu(); |
1397 } | 1399 } |
1398 | 1400 |
1399 void RenderFrameImpl::OnCustomContextMenuAction( | 1401 void RenderFrameImpl::OnCustomContextMenuAction( |
1400 const CustomContextMenuContext& custom_context, | 1402 const CustomContextMenuContext& custom_context, |
1401 unsigned action) { | 1403 unsigned action) { |
1402 if (custom_context.request_id) { | 1404 if (custom_context.request_id) { |
1403 // External context menu request, look in our map. | 1405 // External context menu request, look in our map. |
1404 ContextMenuClient* client = | 1406 ContextMenuClient* client = |
1405 pending_context_menus_.Lookup(custom_context.request_id); | 1407 pending_context_menus_.Lookup(custom_context.request_id); |
1406 if (client) | 1408 if (client) |
(...skipping 3963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5370 media::ConvertToSwitchOutputDeviceCB(web_callbacks); | 5372 media::ConvertToSwitchOutputDeviceCB(web_callbacks); |
5371 scoped_refptr<media::AudioOutputDevice> device = | 5373 scoped_refptr<media::AudioOutputDevice> device = |
5372 AudioDeviceFactory::NewOutputDevice(routing_id_, 0, sink_id.utf8(), | 5374 AudioDeviceFactory::NewOutputDevice(routing_id_, 0, sink_id.utf8(), |
5373 security_origin); | 5375 security_origin); |
5374 media::OutputDeviceStatus status = device->GetDeviceStatus(); | 5376 media::OutputDeviceStatus status = device->GetDeviceStatus(); |
5375 device->Stop(); | 5377 device->Stop(); |
5376 callback.Run(status); | 5378 callback.Run(status); |
5377 } | 5379 } |
5378 | 5380 |
5379 } // namespace content | 5381 } // namespace content |
OLD | NEW |