Chromium Code Reviews| 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 1562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1573 // TODO(jcivelli): Remove this deprecated method when its been removed from | 1573 // TODO(jcivelli): Remove this deprecated method when its been removed from |
| 1574 // the WebViewClient interface. It's been replaced by | 1574 // the WebViewClient interface. It's been replaced by |
| 1575 // createExternalPopupMenu. | 1575 // createExternalPopupMenu. |
| 1576 NOTREACHED(); | 1576 NOTREACHED(); |
| 1577 return NULL; | 1577 return NULL; |
| 1578 } | 1578 } |
| 1579 | 1579 |
| 1580 WebExternalPopupMenu* RenderViewImpl::createExternalPopupMenu( | 1580 WebExternalPopupMenu* RenderViewImpl::createExternalPopupMenu( |
| 1581 const WebPopupMenuInfo& popup_menu_info, | 1581 const WebPopupMenuInfo& popup_menu_info, |
| 1582 WebExternalPopupMenuClient* popup_menu_client) { | 1582 WebExternalPopupMenuClient* popup_menu_client) { |
| 1583 DCHECK(!external_popup_menu_.get()); | 1583 // An IPC message is sent to the browser to build and display the actual |
| 1584 // popup. The user could have time to click a different select by the time | |
| 1585 // the popup is shown. In that case external_popup_menu_ is non NULL. | |
| 1586 // By returning NULL in that case, we instruct WebKit to cancel that new | |
| 1587 // popup. So from the user perspective, only the first one will show, and | |
| 1588 // will have to close the first one before another one can be shown. | |
|
Ilya Sherman
2012/05/14 23:26:04
nit: Perhaps update this comment to mention that t
| |
| 1589 if (external_popup_menu_.get()) | |
| 1590 return NULL; | |
| 1584 external_popup_menu_.reset( | 1591 external_popup_menu_.reset( |
| 1585 new ExternalPopupMenu(this, popup_menu_info, popup_menu_client)); | 1592 new ExternalPopupMenu(this, popup_menu_info, popup_menu_client)); |
| 1586 return external_popup_menu_.get(); | 1593 return external_popup_menu_.get(); |
| 1587 } | 1594 } |
| 1588 | 1595 |
| 1589 RenderWidgetFullscreenPepper* RenderViewImpl::CreatePepperFullscreenContainer( | 1596 RenderWidgetFullscreenPepper* RenderViewImpl::CreatePepperFullscreenContainer( |
| 1590 webkit::ppapi::PluginInstance* plugin) { | 1597 webkit::ppapi::PluginInstance* plugin) { |
| 1591 GURL active_url; | 1598 GURL active_url; |
| 1592 if (webview() && webview()->mainFrame()) | 1599 if (webview() && webview()->mainFrame()) |
| 1593 active_url = GURL(webview()->mainFrame()->document().url()); | 1600 active_url = GURL(webview()->mainFrame()->document().url()); |
| (...skipping 3727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5321 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5328 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
| 5322 return !!RenderThreadImpl::current()->compositor_thread(); | 5329 return !!RenderThreadImpl::current()->compositor_thread(); |
| 5323 } | 5330 } |
| 5324 | 5331 |
| 5325 void RenderViewImpl::OnJavaBridgeInit() { | 5332 void RenderViewImpl::OnJavaBridgeInit() { |
| 5326 DCHECK(!java_bridge_dispatcher_); | 5333 DCHECK(!java_bridge_dispatcher_); |
| 5327 #if defined(ENABLE_JAVA_BRIDGE) | 5334 #if defined(ENABLE_JAVA_BRIDGE) |
| 5328 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); | 5335 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); |
| 5329 #endif | 5336 #endif |
| 5330 } | 5337 } |
| OLD | NEW |