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. | |
Charlie Reis
2013/01/09 22:35:06
Please add a TODO with a bug number to remove this
Fady Samuel
2013/01/09 22:40:57
Done.
| |
141 guest_renderer_prefs->report_frame_name_changes = true; | |
139 // Navigation is disabled in Chrome Apps. We want to make sure guest-initiated | 142 // Navigation is disabled in Chrome Apps. We want to make sure guest-initiated |
140 // navigations still continue to function inside the app. | 143 // navigations still continue to function inside the app. |
141 guest_renderer_prefs->browser_handles_all_top_level_requests = false; | 144 guest_renderer_prefs->browser_handles_all_top_level_requests = false; |
142 AddGuest(instance_id, guest_web_contents); | 145 AddGuest(instance_id, guest_web_contents); |
143 guest_web_contents->SetDelegate(guest); | 146 guest_web_contents->SetDelegate(guest); |
144 | 147 |
145 // Create a swapped out RenderView for the guest in the embedder render | 148 // 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. | 149 // process, so that the embedder can access the guest's window object. |
147 int guest_routing_id = | 150 int guest_routing_id = |
148 static_cast<WebContentsImpl*>(guest->GetWebContents())-> | 151 static_cast<WebContentsImpl*>(guest->GetWebContents())-> |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
351 uint32 sync_point) { | 354 uint32 sync_point) { |
352 AcceleratedSurfaceMsg_BufferPresented_Params ack_params; | 355 AcceleratedSurfaceMsg_BufferPresented_Params ack_params; |
353 ack_params.mailbox_name = mailbox_name; | 356 ack_params.mailbox_name = mailbox_name; |
354 ack_params.sync_point = sync_point; | 357 ack_params.sync_point = sync_point; |
355 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id, | 358 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id, |
356 gpu_host_id, | 359 gpu_host_id, |
357 ack_params); | 360 ack_params); |
358 } | 361 } |
359 | 362 |
360 } // namespace content | 363 } // namespace content |
OLD | NEW |