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/browser/browser_plugin/browser_plugin_embedder.h" | 5 #include "content/browser/browser_plugin/browser_plugin_embedder.h" |
6 | 6 |
7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
8 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 8 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
9 #include "content/browser/browser_plugin/browser_plugin_host_factory.h" | 9 #include "content/browser/browser_plugin/browser_plugin_host_factory.h" |
10 #include "content/browser/renderer_host/render_view_host_impl.h" | 10 #include "content/browser/renderer_host/render_view_host_impl.h" |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 guest_web_contents->GetMutableRendererPrefs(); | 129 guest_web_contents->GetMutableRendererPrefs(); |
130 // Copy renderer preferences (and nothing else) from the embedder's | 130 // Copy renderer preferences (and nothing else) from the embedder's |
131 // TabContents to the guest. | 131 // TabContents to the guest. |
132 // | 132 // |
133 // For GTK and Aura this is necessary to get proper renderer configuration | 133 // For GTK and Aura this is necessary to get proper renderer configuration |
134 // values for caret blinking interval, colors related to selection and | 134 // values for caret blinking interval, colors related to selection and |
135 // focus. | 135 // focus. |
136 *guest_renderer_prefs = *web_contents()->GetMutableRendererPrefs(); | 136 *guest_renderer_prefs = *web_contents()->GetMutableRendererPrefs(); |
137 | 137 |
138 guest_renderer_prefs->throttle_input_events = false; | 138 guest_renderer_prefs->throttle_input_events = false; |
| 139 // We would like the guest to report changes to frame names so that we can |
| 140 // update the BrowserPlugin's corresponding 'name' attribute. |
| 141 // TODO(fsamuel): Remove this once http://crbug.com/169110 is addressed. |
| 142 guest_renderer_prefs->report_frame_name_changes = true; |
139 // Navigation is disabled in Chrome Apps. We want to make sure guest-initiated | 143 // Navigation is disabled in Chrome Apps. We want to make sure guest-initiated |
140 // navigations still continue to function inside the app. | 144 // navigations still continue to function inside the app. |
141 guest_renderer_prefs->browser_handles_all_top_level_requests = false; | 145 guest_renderer_prefs->browser_handles_all_top_level_requests = false; |
142 AddGuest(instance_id, guest_web_contents); | 146 AddGuest(instance_id, guest_web_contents); |
143 guest_web_contents->SetDelegate(guest); | 147 guest_web_contents->SetDelegate(guest); |
144 | 148 |
145 // Create a swapped out RenderView for the guest in the embedder render | 149 // Create a swapped out RenderView for the guest in the embedder render |
146 // process, so that the embedder can access the guest's window object. | 150 // process, so that the embedder can access the guest's window object. |
147 int guest_routing_id = | 151 int guest_routing_id = |
148 static_cast<WebContentsImpl*>(guest->GetWebContents())-> | 152 static_cast<WebContentsImpl*>(guest->GetWebContents())-> |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 uint32 sync_point) { | 355 uint32 sync_point) { |
352 AcceleratedSurfaceMsg_BufferPresented_Params ack_params; | 356 AcceleratedSurfaceMsg_BufferPresented_Params ack_params; |
353 ack_params.mailbox_name = mailbox_name; | 357 ack_params.mailbox_name = mailbox_name; |
354 ack_params.sync_point = sync_point; | 358 ack_params.sync_point = sync_point; |
355 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id, | 359 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id, |
356 gpu_host_id, | 360 gpu_host_id, |
357 ack_params); | 361 ack_params); |
358 } | 362 } |
359 | 363 |
360 } // namespace content | 364 } // namespace content |
OLD | NEW |