Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: chrome/browser/guest_view/web_view/web_view_guest.cc

Issue 363563004: Move extensions-only render IPC messages into the extension messages header. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
11 #include "chrome/browser/extensions/api/web_request/web_request_api.h" 11 #include "chrome/browser/extensions/api/web_request/web_request_api.h"
12 #include "chrome/browser/extensions/api/web_view/web_view_internal_api.h" 12 #include "chrome/browser/extensions/api/web_view/web_view_internal_api.h"
13 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" 13 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h"
14 #include "chrome/browser/extensions/menu_manager.h" 14 #include "chrome/browser/extensions/menu_manager.h"
15 #include "chrome/browser/extensions/script_executor.h" 15 #include "chrome/browser/extensions/script_executor.h"
16 #include "chrome/browser/favicon/favicon_tab_helper.h" 16 #include "chrome/browser/favicon/favicon_tab_helper.h"
17 #include "chrome/browser/guest_view/guest_view_constants.h" 17 #include "chrome/browser/guest_view/guest_view_constants.h"
18 #include "chrome/browser/guest_view/guest_view_manager.h" 18 #include "chrome/browser/guest_view/guest_view_manager.h"
19 #include "chrome/browser/guest_view/web_view/web_view_constants.h" 19 #include "chrome/browser/guest_view/web_view/web_view_constants.h"
20 #include "chrome/browser/guest_view/web_view/web_view_permission_helper.h" 20 #include "chrome/browser/guest_view/web_view/web_view_permission_helper.h"
21 #include "chrome/browser/guest_view/web_view/web_view_permission_types.h" 21 #include "chrome/browser/guest_view/web_view/web_view_permission_types.h"
22 #include "chrome/browser/guest_view/web_view/web_view_renderer_state.h" 22 #include "chrome/browser/guest_view/web_view/web_view_renderer_state.h"
23 #include "chrome/browser/renderer_context_menu/context_menu_delegate.h" 23 #include "chrome/browser/renderer_context_menu/context_menu_delegate.h"
24 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h" 24 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h"
25 #include "chrome/browser/ui/pdf/pdf_tab_helper.h" 25 #include "chrome/browser/ui/pdf/pdf_tab_helper.h"
26 #include "chrome/browser/ui/zoom/zoom_controller.h" 26 #include "chrome/browser/ui/zoom/zoom_controller.h"
27 #include "chrome/common/chrome_version_info.h" 27 #include "chrome/common/chrome_version_info.h"
28 #include "chrome/common/extensions/chrome_extension_messages.h"
28 #include "chrome/common/render_messages.h" 29 #include "chrome/common/render_messages.h"
29 #include "content/public/browser/browser_thread.h" 30 #include "content/public/browser/browser_thread.h"
30 #include "content/public/browser/child_process_security_policy.h" 31 #include "content/public/browser/child_process_security_policy.h"
31 #include "content/public/browser/native_web_keyboard_event.h" 32 #include "content/public/browser/native_web_keyboard_event.h"
32 #include "content/public/browser/navigation_entry.h" 33 #include "content/public/browser/navigation_entry.h"
33 #include "content/public/browser/notification_details.h" 34 #include "content/public/browser/notification_details.h"
34 #include "content/public/browser/notification_service.h" 35 #include "content/public/browser/notification_service.h"
35 #include "content/public/browser/notification_source.h" 36 #include "content/public/browser/notification_source.h"
36 #include "content/public/browser/notification_types.h" 37 #include "content/public/browser/notification_types.h"
37 #include "content/public/browser/render_process_host.h" 38 #include "content/public/browser/render_process_host.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 } else { 161 } else {
161 *storage_partition_id = partition_str; 162 *storage_partition_id = partition_str;
162 *persist_storage = false; 163 *persist_storage = false;
163 } 164 }
164 } 165 }
165 166
166 } // namespace 167 } // namespace
167 168
168 WebViewGuest::WebViewGuest(content::BrowserContext* browser_context, 169 WebViewGuest::WebViewGuest(content::BrowserContext* browser_context,
169 int guest_instance_id) 170 int guest_instance_id)
170 : GuestView<WebViewGuest>(browser_context, guest_instance_id), 171 : GuestView<WebViewGuest>(browser_context, guest_instance_id),
171 pending_context_menu_request_id_(0), 172 pending_context_menu_request_id_(0),
172 is_overriding_user_agent_(false), 173 is_overriding_user_agent_(false),
173 chromevox_injected_(false), 174 chromevox_injected_(false),
174 current_zoom_factor_(1.0), 175 current_zoom_factor_(1.0),
175 find_helper_(this), 176 find_helper_(this),
176 javascript_dialog_helper_(this) { 177 javascript_dialog_helper_(this) {
177 } 178 }
178 179
179 // static 180 // static
180 bool WebViewGuest::GetGuestPartitionConfigForSite( 181 bool WebViewGuest::GetGuestPartitionConfigForSite(
(...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after
1220 bool allow, 1221 bool allow,
1221 const std::string& user_input) { 1222 const std::string& user_input) {
1222 WebViewGuest* guest = 1223 WebViewGuest* guest =
1223 WebViewGuest::From(embedder_render_process_id(), new_window_instance_id); 1224 WebViewGuest::From(embedder_render_process_id(), new_window_instance_id);
1224 if (!guest) 1225 if (!guest)
1225 return; 1226 return;
1226 1227
1227 if (!allow) 1228 if (!allow)
1228 guest->Destroy(); 1229 guest->Destroy();
1229 } 1230 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698