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/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1659 | 1659 |
1660 WebWidget* RenderViewImpl::createPopupMenu(WebKit::WebPopupType popup_type) { | 1660 WebWidget* RenderViewImpl::createPopupMenu(WebKit::WebPopupType popup_type) { |
1661 RenderWidget* widget = | 1661 RenderWidget* widget = |
1662 RenderWidget::Create(routing_id_, popup_type, screen_info_); | 1662 RenderWidget::Create(routing_id_, popup_type, screen_info_); |
1663 return widget->webwidget(); | 1663 return widget->webwidget(); |
1664 } | 1664 } |
1665 | 1665 |
1666 WebExternalPopupMenu* RenderViewImpl::createExternalPopupMenu( | 1666 WebExternalPopupMenu* RenderViewImpl::createExternalPopupMenu( |
1667 const WebPopupMenuInfo& popup_menu_info, | 1667 const WebPopupMenuInfo& popup_menu_info, |
1668 WebExternalPopupMenuClient* popup_menu_client) { | 1668 WebExternalPopupMenuClient* popup_menu_client) { |
1669 // TODO(jcivelli): http:/b/5793321 Implement a better fix, as detailed in bug. | 1669 // An IPC message is sent to the browser to build and display the actual |
1670 DCHECK(!external_popup_menu_.get()); | 1670 // popup. The user could have time to click a different select by the time |
| 1671 // the popup is shown. In that case external_popup_menu_ is non NULL. |
| 1672 // By returning NULL in that case, we instruct WebKit to cancel that new |
| 1673 // popup. So from the user perspective, only the first one will show, and |
| 1674 // will have to close the first one before another one can be shown. |
| 1675 if (external_popup_menu_.get()) |
| 1676 return NULL; |
1671 external_popup_menu_.reset( | 1677 external_popup_menu_.reset( |
1672 new ExternalPopupMenu(this, popup_menu_info, popup_menu_client)); | 1678 new ExternalPopupMenu(this, popup_menu_info, popup_menu_client)); |
1673 return external_popup_menu_.get(); | 1679 return external_popup_menu_.get(); |
1674 } | 1680 } |
1675 | 1681 |
1676 RenderWidgetFullscreenPepper* RenderViewImpl::CreatePepperFullscreenContainer( | 1682 RenderWidgetFullscreenPepper* RenderViewImpl::CreatePepperFullscreenContainer( |
1677 webkit::ppapi::PluginInstance* plugin) { | 1683 webkit::ppapi::PluginInstance* plugin) { |
1678 GURL active_url; | 1684 GURL active_url; |
1679 if (webview() && webview()->mainFrame()) | 1685 if (webview() && webview()->mainFrame()) |
1680 active_url = GURL(webview()->mainFrame()->document().url()); | 1686 active_url = GURL(webview()->mainFrame()->document().url()); |
(...skipping 3854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5535 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5541 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
5536 return !!RenderThreadImpl::current()->compositor_thread(); | 5542 return !!RenderThreadImpl::current()->compositor_thread(); |
5537 } | 5543 } |
5538 | 5544 |
5539 void RenderViewImpl::OnJavaBridgeInit() { | 5545 void RenderViewImpl::OnJavaBridgeInit() { |
5540 DCHECK(!java_bridge_dispatcher_); | 5546 DCHECK(!java_bridge_dispatcher_); |
5541 #if defined(ENABLE_JAVA_BRIDGE) | 5547 #if defined(ENABLE_JAVA_BRIDGE) |
5542 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); | 5548 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); |
5543 #endif | 5549 #endif |
5544 } | 5550 } |
OLD | NEW |