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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 #if defined(ENABLE_PLUGINS) && !defined(OS_ANDROID) | 68 #if defined(ENABLE_PLUGINS) && !defined(OS_ANDROID) |
69 #include "chrome/browser/guest_view/web_view/plugin_permission_helper.h" | 69 #include "chrome/browser/guest_view/web_view/plugin_permission_helper.h" |
70 #endif | 70 #endif |
71 | 71 |
72 #if defined(OS_CHROMEOS) | 72 #if defined(OS_CHROMEOS) |
73 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" | 73 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
74 #endif | 74 #endif |
75 | 75 |
76 using base::UserMetricsAction; | 76 using base::UserMetricsAction; |
77 using content::RenderFrameHost; | 77 using content::RenderFrameHost; |
| 78 using content::ResourceType; |
78 using content::WebContents; | 79 using content::WebContents; |
79 | 80 |
80 namespace { | 81 namespace { |
81 | 82 |
82 std::string WindowOpenDispositionToString( | 83 std::string WindowOpenDispositionToString( |
83 WindowOpenDisposition window_open_disposition) { | 84 WindowOpenDisposition window_open_disposition) { |
84 switch (window_open_disposition) { | 85 switch (window_open_disposition) { |
85 case IGNORE_ACTION: | 86 case IGNORE_ACTION: |
86 return "ignore"; | 87 return "ignore"; |
87 case SAVE_TO_DISK: | 88 case SAVE_TO_DISK: |
(...skipping 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1646 bool allow, | 1647 bool allow, |
1647 const std::string& user_input) { | 1648 const std::string& user_input) { |
1648 WebViewGuest* guest = | 1649 WebViewGuest* guest = |
1649 WebViewGuest::From(embedder_render_process_id(), new_window_instance_id); | 1650 WebViewGuest::From(embedder_render_process_id(), new_window_instance_id); |
1650 if (!guest) | 1651 if (!guest) |
1651 return; | 1652 return; |
1652 | 1653 |
1653 if (!allow) | 1654 if (!allow) |
1654 guest->Destroy(); | 1655 guest->Destroy(); |
1655 } | 1656 } |
OLD | NEW |