| 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 "chrome/browser/guest_view/web_view/web_view_guest.h" | 5 #include "chrome/browser/guest_view/web_view/web_view_guest.h" |
| 6 | 6 |
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 content::RecordAction( | 270 content::RecordAction( |
| 271 UserMetricsAction("WebView.PermissionDeny.Geolocation")); | 271 UserMetricsAction("WebView.PermissionDeny.Geolocation")); |
| 272 break; | 272 break; |
| 273 case WEB_VIEW_PERMISSION_TYPE_JAVASCRIPT_DIALOG: | 273 case WEB_VIEW_PERMISSION_TYPE_JAVASCRIPT_DIALOG: |
| 274 content::RecordAction( | 274 content::RecordAction( |
| 275 UserMetricsAction("WebView.PermissionDeny.JSDialog")); | 275 UserMetricsAction("WebView.PermissionDeny.JSDialog")); |
| 276 break; | 276 break; |
| 277 case WEB_VIEW_PERMISSION_TYPE_LOAD_PLUGIN: | 277 case WEB_VIEW_PERMISSION_TYPE_LOAD_PLUGIN: |
| 278 content::RecordAction( | 278 content::RecordAction( |
| 279 UserMetricsAction("WebView.Guest.PermissionDeny.PluginLoad")); | 279 UserMetricsAction("WebView.Guest.PermissionDeny.PluginLoad")); |
| 280 break; |
| 280 case WEB_VIEW_PERMISSION_TYPE_MEDIA: | 281 case WEB_VIEW_PERMISSION_TYPE_MEDIA: |
| 281 content::RecordAction( | 282 content::RecordAction( |
| 282 UserMetricsAction("WebView.PermissionDeny.Media")); | 283 UserMetricsAction("WebView.PermissionDeny.Media")); |
| 283 break; | 284 break; |
| 284 case WEB_VIEW_PERMISSION_TYPE_NEW_WINDOW: | 285 case WEB_VIEW_PERMISSION_TYPE_NEW_WINDOW: |
| 285 content::RecordAction( | 286 content::RecordAction( |
| 286 UserMetricsAction("BrowserPlugin.PermissionDeny.NewWindow")); | 287 UserMetricsAction("BrowserPlugin.PermissionDeny.NewWindow")); |
| 287 break; | 288 break; |
| 288 case WEB_VIEW_PERMISSION_TYPE_POINTER_LOCK: | 289 case WEB_VIEW_PERMISSION_TYPE_POINTER_LOCK: |
| 289 content::RecordAction( | 290 content::RecordAction( |
| (...skipping 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1414 bool allow, | 1415 bool allow, |
| 1415 const std::string& user_input) { | 1416 const std::string& user_input) { |
| 1416 WebViewGuest* guest = | 1417 WebViewGuest* guest = |
| 1417 WebViewGuest::From(embedder_render_process_id(), new_window_instance_id); | 1418 WebViewGuest::From(embedder_render_process_id(), new_window_instance_id); |
| 1418 if (!guest) | 1419 if (!guest) |
| 1419 return; | 1420 return; |
| 1420 | 1421 |
| 1421 if (!allow) | 1422 if (!allow) |
| 1422 guest->Destroy(); | 1423 guest->Destroy(); |
| 1423 } | 1424 } |
| OLD | NEW |