| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chromecast/browser/cast_content_browser_client.h" | 5 #include "chromecast/browser/cast_content_browser_client.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 return CastNetworkDelegate::DeviceCert(); | 246 return CastNetworkDelegate::DeviceCert(); |
| 247 } else { | 247 } else { |
| 248 LOG(ERROR) << "Invalid host for client certificate request: " | 248 LOG(ERROR) << "Invalid host for client certificate request: " |
| 249 << requesting_url.host() | 249 << requesting_url.host() |
| 250 << " with render_process_id: " | 250 << " with render_process_id: " |
| 251 << render_process_id; | 251 << render_process_id; |
| 252 return NULL; | 252 return NULL; |
| 253 } | 253 } |
| 254 } | 254 } |
| 255 | 255 |
| 256 void CastContentBrowserClient::RequestPermission( |
| 257 content::PermissionType permission, |
| 258 content::WebContents* web_contents, |
| 259 int bridge_id, |
| 260 const GURL& requesting_frame, |
| 261 bool user_gesture, |
| 262 const base::Callback<void(content::PermissionStatus)>& callback) { |
| 263 LOG(INFO) << __FUNCTION__ << ": " << static_cast<int>(permission); |
| 264 callback.Run(content::PermissionStatus::PERMISSION_STATUS_GRANTED); |
| 265 } |
| 266 |
| 267 content::PermissionStatus CastContentBrowserClient::GetPermissionStatus( |
| 268 content::PermissionType permission, |
| 269 content::BrowserContext* browser_context, |
| 270 const GURL& requesting_origin, |
| 271 const GURL& embedding_origin) { |
| 272 LOG(INFO) << __FUNCTION__ << ": " << static_cast<int>(permission); |
| 273 return content::PermissionStatus::PERMISSION_STATUS_GRANTED; |
| 274 } |
| 275 |
| 256 bool CastContentBrowserClient::CanCreateWindow( | 276 bool CastContentBrowserClient::CanCreateWindow( |
| 257 const GURL& opener_url, | 277 const GURL& opener_url, |
| 258 const GURL& opener_top_level_frame_url, | 278 const GURL& opener_top_level_frame_url, |
| 259 const GURL& source_origin, | 279 const GURL& source_origin, |
| 260 WindowContainerType container_type, | 280 WindowContainerType container_type, |
| 261 const GURL& target_url, | 281 const GURL& target_url, |
| 262 const content::Referrer& referrer, | 282 const content::Referrer& referrer, |
| 263 WindowOpenDisposition disposition, | 283 WindowOpenDisposition disposition, |
| 264 const blink::WebWindowFeatures& features, | 284 const blink::WebWindowFeatures& features, |
| 265 bool user_gesture, | 285 bool user_gesture, |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 process_type, dumps_path, false /* upload */); | 385 process_type, dumps_path, false /* upload */); |
| 366 // StartUploaderThread() even though upload is diferred. | 386 // StartUploaderThread() even though upload is diferred. |
| 367 // Breakpad-related memory is freed in the uploader thread. | 387 // Breakpad-related memory is freed in the uploader thread. |
| 368 crash_handler->StartUploaderThread(); | 388 crash_handler->StartUploaderThread(); |
| 369 return crash_handler; | 389 return crash_handler; |
| 370 } | 390 } |
| 371 #endif // !defined(OS_ANDROID) | 391 #endif // !defined(OS_ANDROID) |
| 372 | 392 |
| 373 } // namespace shell | 393 } // namespace shell |
| 374 } // namespace chromecast | 394 } // namespace chromecast |
| OLD | NEW |