Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 10441101: Revert 124453 - WebWidgetClient::screenInfo() no longer does a synchronous IPC. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: perged Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 const content::RendererPreferences& renderer_prefs, 491 const content::RendererPreferences& renderer_prefs,
492 const WebPreferences& webkit_prefs, 492 const WebPreferences& webkit_prefs,
493 SharedRenderViewCounter* counter, 493 SharedRenderViewCounter* counter,
494 int32 routing_id, 494 int32 routing_id,
495 int32 surface_id, 495 int32 surface_id,
496 int64 session_storage_namespace_id, 496 int64 session_storage_namespace_id,
497 const string16& frame_name, 497 const string16& frame_name,
498 bool is_renderer_created, 498 bool is_renderer_created,
499 bool swapped_out, 499 bool swapped_out,
500 int32 next_page_id, 500 int32 next_page_id,
501 const WebKit::WebScreenInfo& screen_info,
502 content::GuestToEmbedderChannel* guest_to_embedder_channel, 501 content::GuestToEmbedderChannel* guest_to_embedder_channel,
503 AccessibilityMode accessibility_mode) 502 AccessibilityMode accessibility_mode)
504 : RenderWidget(WebKit::WebPopupTypeNone, screen_info, swapped_out), 503 : RenderWidget(WebKit::WebPopupTypeNone, swapped_out),
505 webkit_preferences_(webkit_prefs), 504 webkit_preferences_(webkit_prefs),
506 send_content_state_immediately_(false), 505 send_content_state_immediately_(false),
507 enabled_bindings_(0), 506 enabled_bindings_(0),
508 send_preferred_size_changes_(false), 507 send_preferred_size_changes_(false),
509 is_loading_(false), 508 is_loading_(false),
510 navigation_gesture_(NavigationGestureUnknown), 509 navigation_gesture_(NavigationGestureUnknown),
511 opened_by_user_gesture_(true), 510 opened_by_user_gesture_(true),
512 opener_suppressed_(false), 511 opener_suppressed_(false),
513 page_id_(-1), 512 page_id_(-1),
514 last_page_id_sent_to_browser_(-1), 513 last_page_id_sent_to_browser_(-1),
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 const content::RendererPreferences& renderer_prefs, 707 const content::RendererPreferences& renderer_prefs,
709 const WebPreferences& webkit_prefs, 708 const WebPreferences& webkit_prefs,
710 SharedRenderViewCounter* counter, 709 SharedRenderViewCounter* counter,
711 int32 routing_id, 710 int32 routing_id,
712 int32 surface_id, 711 int32 surface_id,
713 int64 session_storage_namespace_id, 712 int64 session_storage_namespace_id,
714 const string16& frame_name, 713 const string16& frame_name,
715 bool is_renderer_created, 714 bool is_renderer_created,
716 bool swapped_out, 715 bool swapped_out,
717 int32 next_page_id, 716 int32 next_page_id,
718 const WebKit::WebScreenInfo& screen_info,
719 content::GuestToEmbedderChannel* guest_to_embedder_channel, 717 content::GuestToEmbedderChannel* guest_to_embedder_channel,
720 AccessibilityMode accessibility_mode) { 718 AccessibilityMode accessibility_mode) {
721 DCHECK(routing_id != MSG_ROUTING_NONE); 719 DCHECK(routing_id != MSG_ROUTING_NONE);
722 return new RenderViewImpl( 720 return new RenderViewImpl(
723 parent_hwnd, 721 parent_hwnd,
724 opener_id, 722 opener_id,
725 renderer_prefs, 723 renderer_prefs,
726 webkit_prefs, 724 webkit_prefs,
727 counter, 725 counter,
728 routing_id, 726 routing_id,
729 surface_id, 727 surface_id,
730 session_storage_namespace_id, 728 session_storage_namespace_id,
731 frame_name, 729 frame_name,
732 is_renderer_created, 730 is_renderer_created,
733 swapped_out, 731 swapped_out,
734 next_page_id, 732 next_page_id,
735 screen_info,
736 guest_to_embedder_channel, 733 guest_to_embedder_channel,
737 accessibility_mode); 734 accessibility_mode);
738 } 735 }
739 736
740 WebPeerConnectionHandler* RenderViewImpl::CreatePeerConnectionHandler( 737 WebPeerConnectionHandler* RenderViewImpl::CreatePeerConnectionHandler(
741 WebPeerConnectionHandlerClient* client) { 738 WebPeerConnectionHandlerClient* client) {
742 EnsureMediaStreamImpl(); 739 EnsureMediaStreamImpl();
743 if (!media_stream_impl_) 740 if (!media_stream_impl_)
744 return NULL; 741 return NULL;
745 return media_stream_impl_->CreatePeerConnectionHandler(client); 742 return media_stream_impl_->CreatePeerConnectionHandler(client);
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
1626 renderer_preferences_, 1623 renderer_preferences_,
1627 webkit_preferences_, 1624 webkit_preferences_,
1628 shared_popup_counter_, 1625 shared_popup_counter_,
1629 routing_id, 1626 routing_id,
1630 surface_id, 1627 surface_id,
1631 cloned_session_storage_namespace_id, 1628 cloned_session_storage_namespace_id,
1632 frame_name, 1629 frame_name,
1633 true, 1630 true,
1634 false, 1631 false,
1635 1, 1632 1,
1636 screen_info_,
1637 guest_to_embedder_channel_, 1633 guest_to_embedder_channel_,
1638 accessibility_mode_); 1634 accessibility_mode_);
1639 view->opened_by_user_gesture_ = params.user_gesture; 1635 view->opened_by_user_gesture_ = params.user_gesture;
1640 1636
1641 // Record whether the creator frame is trying to suppress the opener field. 1637 // Record whether the creator frame is trying to suppress the opener field.
1642 view->opener_suppressed_ = params.opener_suppressed; 1638 view->opener_suppressed_ = params.opener_suppressed;
1643 1639
1644 // Record the security origin of the creator. 1640 // Record the security origin of the creator.
1645 GURL creator_url(creator->document().securityOrigin().toString().utf8()); 1641 GURL creator_url(creator->document().securityOrigin().toString().utf8());
1646 if (!creator_url.is_valid() || !creator_url.IsStandard()) 1642 if (!creator_url.is_valid() || !creator_url.IsStandard())
1647 creator_url = GURL(); 1643 creator_url = GURL();
1648 view->creator_url_ = creator_url; 1644 view->creator_url_ = creator_url;
1649 1645
1650 // Copy over the alternate error page URL so we can have alt error pages in 1646 // Copy over the alternate error page URL so we can have alt error pages in
1651 // the new render view (we don't need the browser to send the URL back down). 1647 // the new render view (we don't need the browser to send the URL back down).
1652 view->alternate_error_page_url_ = alternate_error_page_url_; 1648 view->alternate_error_page_url_ = alternate_error_page_url_;
1653 1649
1654 return view->webview(); 1650 return view->webview();
1655 } 1651 }
1656 1652
1657 WebWidget* RenderViewImpl::createPopupMenu(WebKit::WebPopupType popup_type) { 1653 WebWidget* RenderViewImpl::createPopupMenu(WebKit::WebPopupType popup_type) {
1658 RenderWidget* widget = 1654 RenderWidget* widget =
1659 RenderWidget::Create(routing_id_, popup_type, screen_info_); 1655 RenderWidget::Create(routing_id_, popup_type);
1660 return widget->webwidget(); 1656 return widget->webwidget();
1661 } 1657 }
1662 1658
1663 WebExternalPopupMenu* RenderViewImpl::createExternalPopupMenu( 1659 WebExternalPopupMenu* RenderViewImpl::createExternalPopupMenu(
1664 const WebPopupMenuInfo& popup_menu_info, 1660 const WebPopupMenuInfo& popup_menu_info,
1665 WebExternalPopupMenuClient* popup_menu_client) { 1661 WebExternalPopupMenuClient* popup_menu_client) {
1666 // An IPC message is sent to the browser to build and display the actual 1662 // An IPC message is sent to the browser to build and display the actual
1667 // popup. The user could have time to click a different select by the time 1663 // popup. The user could have time to click a different select by the time
1668 // the popup is shown. In that case external_popup_menu_ is non NULL. 1664 // the popup is shown. In that case external_popup_menu_ is non NULL.
1669 // By returning NULL in that case, we instruct WebKit to cancel that new 1665 // By returning NULL in that case, we instruct WebKit to cancel that new
(...skipping 3866 matching lines...) Expand 10 before | Expand all | Expand 10 after
5536 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { 5532 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const {
5537 return !!RenderThreadImpl::current()->compositor_thread(); 5533 return !!RenderThreadImpl::current()->compositor_thread();
5538 } 5534 }
5539 5535
5540 void RenderViewImpl::OnJavaBridgeInit() { 5536 void RenderViewImpl::OnJavaBridgeInit() {
5541 DCHECK(!java_bridge_dispatcher_); 5537 DCHECK(!java_bridge_dispatcher_);
5542 #if defined(ENABLE_JAVA_BRIDGE) 5538 #if defined(ENABLE_JAVA_BRIDGE)
5543 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); 5539 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this);
5544 #endif 5540 #endif
5545 } 5541 }
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698