| 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_guest.h" | 5 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 const gfx::Rect& initial_pos, | 302 const gfx::Rect& initial_pos, |
| 303 bool user_gesture, | 303 bool user_gesture, |
| 304 bool* was_blocked) { | 304 bool* was_blocked) { |
| 305 *was_blocked = false; | 305 *was_blocked = false; |
| 306 RequestNewWindowPermission(static_cast<WebContentsImpl*>(new_contents), | 306 RequestNewWindowPermission(static_cast<WebContentsImpl*>(new_contents), |
| 307 disposition, initial_pos, user_gesture); | 307 disposition, initial_pos, user_gesture); |
| 308 } | 308 } |
| 309 | 309 |
| 310 bool BrowserPluginGuest::CanDownload(RenderViewHost* render_view_host, | 310 bool BrowserPluginGuest::CanDownload(RenderViewHost* render_view_host, |
| 311 int request_id, | 311 int request_id, |
| 312 bool has_auth, |
| 312 const std::string& request_method) { | 313 const std::string& request_method) { |
| 313 // TODO(fsamuel): We disable downloads in guests for now, but we will later | 314 // TODO(fsamuel): We disable downloads in guests for now, but we will later |
| 314 // expose API to allow embedders to handle them. | 315 // expose API to allow embedders to handle them. |
| 315 // Note: it seems content_shell ignores this. This should be fixed | 316 // Note: it seems content_shell ignores this. This should be fixed |
| 316 // for debugging and test purposes. | 317 // for debugging and test purposes. |
| 317 return false; | 318 return false; |
| 318 } | 319 } |
| 319 | 320 |
| 320 bool BrowserPluginGuest::HandleContextMenu( | 321 bool BrowserPluginGuest::HandleContextMenu( |
| 321 const ContextMenuParams& params) { | 322 const ContextMenuParams& params) { |
| (...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1230 LOG(INFO) << "Guest not found. Instance ID: " << instance_id; | 1231 LOG(INFO) << "Guest not found. Instance ID: " << instance_id; |
| 1231 return; | 1232 return; |
| 1232 } | 1233 } |
| 1233 if (!should_allow) | 1234 if (!should_allow) |
| 1234 guest->Destroy(); | 1235 guest->Destroy(); |
| 1235 // If we do not destroy the guest then we allow the new window. | 1236 // If we do not destroy the guest then we allow the new window. |
| 1236 new_window_request_map_.erase(new_window_request_iter); | 1237 new_window_request_map_.erase(new_window_request_iter); |
| 1237 } | 1238 } |
| 1238 | 1239 |
| 1239 } // namespace content | 1240 } // namespace content |
| OLD | NEW |