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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 301733006: Zoom Extension API (chrome) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments, make zoom bubble icon loading safer. Created 6 years, 6 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 (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 "chrome/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 #include "chrome/browser/ssl/ssl_blocking_page.h" 76 #include "chrome/browser/ssl/ssl_blocking_page.h"
77 #include "chrome/browser/ssl/ssl_client_certificate_selector.h" 77 #include "chrome/browser/ssl/ssl_client_certificate_selector.h"
78 #include "chrome/browser/sync_file_system/local/sync_file_system_backend.h" 78 #include "chrome/browser/sync_file_system/local/sync_file_system_backend.h"
79 #include "chrome/browser/tab_contents/tab_util.h" 79 #include "chrome/browser/tab_contents/tab_util.h"
80 #include "chrome/browser/ui/blocked_content/blocked_window_params.h" 80 #include "chrome/browser/ui/blocked_content/blocked_window_params.h"
81 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" 81 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h"
82 #include "chrome/browser/ui/chrome_select_file_policy.h" 82 #include "chrome/browser/ui/chrome_select_file_policy.h"
83 #include "chrome/browser/ui/sync/sync_promo_ui.h" 83 #include "chrome/browser/ui/sync/sync_promo_ui.h"
84 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h" 84 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h"
85 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" 85 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h"
86 #include "chrome/browser/ui/zoom/zoom_controller.h"
86 #include "chrome/common/chrome_constants.h" 87 #include "chrome/common/chrome_constants.h"
87 #include "chrome/common/chrome_paths.h" 88 #include "chrome/common/chrome_paths.h"
88 #include "chrome/common/chrome_switches.h" 89 #include "chrome/common/chrome_switches.h"
89 #include "chrome/common/env_vars.h" 90 #include "chrome/common/env_vars.h"
90 #include "chrome/common/extensions/extension_constants.h" 91 #include "chrome/common/extensions/extension_constants.h"
91 #include "chrome/common/extensions/extension_process_policy.h" 92 #include "chrome/common/extensions/extension_process_policy.h"
92 #include "chrome/common/extensions/manifest_handlers/app_isolation_info.h" 93 #include "chrome/common/extensions/manifest_handlers/app_isolation_info.h"
93 #include "chrome/common/logging_chrome.h" 94 #include "chrome/common/logging_chrome.h"
94 #include "chrome/common/pepper_permission_util.h" 95 #include "chrome/common/pepper_permission_util.h"
95 #include "chrome/common/pref_names.h" 96 #include "chrome/common/pref_names.h"
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 865
865 /// TODO(fsamuel): In the future, certain types of GuestViewBases won't 866 /// TODO(fsamuel): In the future, certain types of GuestViewBases won't
866 // require extension bindings. At that point, we should clear |extension_id| 867 // require extension bindings. At that point, we should clear |extension_id|
867 // instead of exiting early. 868 // instead of exiting early.
868 if (!extension_id.empty() && 869 if (!extension_id.empty() &&
869 !service->GetExtensionById(extension_id, false)) { 870 !service->GetExtensionById(extension_id, false)) {
870 NOTREACHED(); 871 NOTREACHED();
871 return; 872 return;
872 } 873 }
873 874
875 // Create a zoom controller for the guest contents give it access to
876 // GetZoomLevel() and and SetZoomLevel() in WebViewGuest.
877 // TODO(wjmaclean) This currently uses the same HostZoomMap as the browser
878 // context, but we eventually want to isolate the guest contents from zoom
879 // changes outside the guest (e.g. in the main browser), so we should
880 // create a separate HostZoomMap for the guest.
881 ZoomController::CreateForWebContents(guest_web_contents);
874 if (opener_web_contents) { 882 if (opener_web_contents) {
875 GuestViewBase* guest = GuestViewBase::FromWebContents(opener_web_contents); 883 GuestViewBase* guest = GuestViewBase::FromWebContents(opener_web_contents);
876 DCHECK(guest); 884 DCHECK(guest);
877 885
878 // Create a new GuestViewBase of the same type as the opener. 886 // Create a new GuestViewBase of the same type as the opener.
879 *guest_delegate = GuestViewBase::Create( 887 *guest_delegate = GuestViewBase::Create(
880 guest_instance_id, 888 guest_instance_id,
881 guest_web_contents, 889 guest_web_contents,
882 extension_id, 890 extension_id,
883 guest->GetViewType()); 891 guest->GetViewType());
(...skipping 1985 matching lines...) Expand 10 before | Expand all | Expand 10 after
2869 switches::kDisableWebRtcEncryption, 2877 switches::kDisableWebRtcEncryption,
2870 }; 2878 };
2871 to_command_line->CopySwitchesFrom(from_command_line, 2879 to_command_line->CopySwitchesFrom(from_command_line,
2872 kWebRtcDevSwitchNames, 2880 kWebRtcDevSwitchNames,
2873 arraysize(kWebRtcDevSwitchNames)); 2881 arraysize(kWebRtcDevSwitchNames));
2874 } 2882 }
2875 } 2883 }
2876 #endif // defined(ENABLE_WEBRTC) 2884 #endif // defined(ENABLE_WEBRTC)
2877 2885
2878 } // namespace chrome 2886 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698