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

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

Issue 836933005: Refactor fullscreen_controller. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix mac build break after rebase to TOT Created 5 years, 11 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // defined(OS_WIN) 10 #endif // defined(OS_WIN)
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 #include "chrome/browser/ui/browser_navigator.h" 97 #include "chrome/browser/ui/browser_navigator.h"
98 #include "chrome/browser/ui/browser_tab_restore_service_delegate.h" 98 #include "chrome/browser/ui/browser_tab_restore_service_delegate.h"
99 #include "chrome/browser/ui/browser_tab_strip_model_delegate.h" 99 #include "chrome/browser/ui/browser_tab_strip_model_delegate.h"
100 #include "chrome/browser/ui/browser_tabstrip.h" 100 #include "chrome/browser/ui/browser_tabstrip.h"
101 #include "chrome/browser/ui/browser_toolbar_model_delegate.h" 101 #include "chrome/browser/ui/browser_toolbar_model_delegate.h"
102 #include "chrome/browser/ui/browser_ui_prefs.h" 102 #include "chrome/browser/ui/browser_ui_prefs.h"
103 #include "chrome/browser/ui/browser_window.h" 103 #include "chrome/browser/ui/browser_window.h"
104 #include "chrome/browser/ui/chrome_pages.h" 104 #include "chrome/browser/ui/chrome_pages.h"
105 #include "chrome/browser/ui/chrome_select_file_policy.h" 105 #include "chrome/browser/ui/chrome_select_file_policy.h"
106 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" 106 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h"
107 #include "chrome/browser/ui/exclusive_access/mouse_lock_controller.h"
107 #include "chrome/browser/ui/fast_unload_controller.h" 108 #include "chrome/browser/ui/fast_unload_controller.h"
108 #include "chrome/browser/ui/find_bar/find_bar.h" 109 #include "chrome/browser/ui/find_bar/find_bar.h"
109 #include "chrome/browser/ui/find_bar/find_bar_controller.h" 110 #include "chrome/browser/ui/find_bar/find_bar_controller.h"
110 #include "chrome/browser/ui/find_bar/find_tab_helper.h" 111 #include "chrome/browser/ui/find_bar/find_tab_helper.h"
111 #include "chrome/browser/ui/global_error/global_error.h" 112 #include "chrome/browser/ui/global_error/global_error.h"
112 #include "chrome/browser/ui/global_error/global_error_service.h" 113 #include "chrome/browser/ui/global_error/global_error_service.h"
113 #include "chrome/browser/ui/global_error/global_error_service_factory.h" 114 #include "chrome/browser/ui/global_error/global_error_service_factory.h"
114 #include "chrome/browser/ui/location_bar/location_bar.h" 115 #include "chrome/browser/ui/location_bar/location_bar.h"
115 #include "chrome/browser/ui/media_utils.h" 116 #include "chrome/browser/ui/media_utils.h"
116 #include "chrome/browser/ui/search/search_delegate.h" 117 #include "chrome/browser/ui/search/search_delegate.h"
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 438
438 // TODO(beng): move to ChromeBrowserMain: 439 // TODO(beng): move to ChromeBrowserMain:
439 if (first_run::ShouldDoPersonalDataManagerFirstRun()) { 440 if (first_run::ShouldDoPersonalDataManagerFirstRun()) {
440 #if defined(OS_WIN) 441 #if defined(OS_WIN)
441 // Notify PDM that this is a first run. 442 // Notify PDM that this is a first run.
442 ImportAutofillDataWin( 443 ImportAutofillDataWin(
443 autofill::PersonalDataManagerFactory::GetForProfile(profile_)); 444 autofill::PersonalDataManagerFactory::GetForProfile(profile_));
444 #endif // defined(OS_WIN) 445 #endif // defined(OS_WIN)
445 } 446 }
446 447
447 fullscreen_controller_.reset(new FullscreenController(this)); 448 exclusive_access_manager_.reset(new ExclusiveAccessManager(this));
448 449
449 // Must be initialized after window_. 450 // Must be initialized after window_.
450 // Also: surprise! a modal dialog host is not necessary to host modal dialogs 451 // Also: surprise! a modal dialog host is not necessary to host modal dialogs
451 // without a modal dialog host, so that value may be null. 452 // without a modal dialog host, so that value may be null.
452 popup_manager_.reset(new web_modal::PopupManager( 453 popup_manager_.reset(new web_modal::PopupManager(
453 GetWebContentsModalDialogHost())); 454 GetWebContentsModalDialogHost()));
454 } 455 }
455 456
456 Browser::~Browser() { 457 Browser::~Browser() {
457 // Stop observing notifications before continuing with destruction. Profile 458 // Stop observing notifications before continuing with destruction. Profile
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 } 778 }
778 779
779 // Those are the only conditions under which we will block shutdown. 780 // Those are the only conditions under which we will block shutdown.
780 return DOWNLOAD_CLOSE_OK; 781 return DOWNLOAD_CLOSE_OK;
781 } 782 }
782 783
783 //////////////////////////////////////////////////////////////////////////////// 784 ////////////////////////////////////////////////////////////////////////////////
784 // Browser, Tab adding/showing functions: 785 // Browser, Tab adding/showing functions:
785 786
786 void Browser::WindowFullscreenStateChanged() { 787 void Browser::WindowFullscreenStateChanged() {
787 fullscreen_controller_->WindowFullscreenStateChanged(); 788 exclusive_access_manager_->fullscreen_controller()
789 ->WindowFullscreenStateChanged();
788 command_controller_->FullscreenStateChanged(); 790 command_controller_->FullscreenStateChanged();
789 UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN); 791 UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN);
790 } 792 }
791 793
792 /////////////////////////////////////////////////////////////////////////////// 794 ///////////////////////////////////////////////////////////////////////////////
793 // Browser, Assorted browser commands: 795 // Browser, Assorted browser commands:
794 796
795 void Browser::ToggleFullscreenModeWithExtension(const GURL& extension_url) { 797 void Browser::ToggleFullscreenModeWithExtension(const GURL& extension_url) {
796 fullscreen_controller_-> 798 exclusive_access_manager_->fullscreen_controller()
797 ToggleBrowserFullscreenModeWithExtension(extension_url); 799 ->ToggleBrowserFullscreenModeWithExtension(extension_url);
798 } 800 }
799 801
800 bool Browser::SupportsWindowFeature(WindowFeature feature) const { 802 bool Browser::SupportsWindowFeature(WindowFeature feature) const {
801 return SupportsWindowFeatureImpl(feature, true); 803 return SupportsWindowFeatureImpl(feature, true);
802 } 804 }
803 805
804 bool Browser::CanSupportWindowFeature(WindowFeature feature) const { 806 bool Browser::CanSupportWindowFeature(WindowFeature feature) const {
805 return SupportsWindowFeatureImpl(feature, false); 807 return SupportsWindowFeatureImpl(feature, false);
806 } 808 }
807 809
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
937 int new_active_index = tab_strip_model_->active_index(); 939 int new_active_index = tab_strip_model_->active_index();
938 if (index < new_active_index) 940 if (index < new_active_index)
939 session_service->SetSelectedTabInWindow(session_id(), 941 session_service->SetSelectedTabInWindow(session_id(),
940 new_active_index); 942 new_active_index);
941 } 943 }
942 } 944 }
943 945
944 void Browser::TabClosingAt(TabStripModel* tab_strip_model, 946 void Browser::TabClosingAt(TabStripModel* tab_strip_model,
945 WebContents* contents, 947 WebContents* contents,
946 int index) { 948 int index) {
947 fullscreen_controller_->OnTabClosing(contents); 949 exclusive_access_manager_->OnTabClosing(contents);
948 SessionService* session_service = 950 SessionService* session_service =
949 SessionServiceFactory::GetForProfile(profile_); 951 SessionServiceFactory::GetForProfile(profile_);
950 if (session_service) 952 if (session_service)
951 session_service->TabClosing(contents); 953 session_service->TabClosing(contents);
952 content::NotificationService::current()->Notify( 954 content::NotificationService::current()->Notify(
953 chrome::NOTIFICATION_TAB_CLOSING, 955 chrome::NOTIFICATION_TAB_CLOSING,
954 content::Source<NavigationController>(&contents->GetController()), 956 content::Source<NavigationController>(&contents->GetController()),
955 content::NotificationService::NoDetails()); 957 content::NotificationService::NoDetails());
956 958
957 if (popup_manager_) 959 if (popup_manager_)
(...skipping 15 matching lines...) Expand all
973 old_active_index - 1); 975 old_active_index - 1);
974 } 976 }
975 977
976 if (popup_manager_) 978 if (popup_manager_)
977 popup_manager_->UnregisterWith(contents); 979 popup_manager_->UnregisterWith(contents);
978 980
979 TabDetachedAtImpl(contents, index, DETACH_TYPE_DETACH); 981 TabDetachedAtImpl(contents, index, DETACH_TYPE_DETACH);
980 } 982 }
981 983
982 void Browser::TabDeactivated(WebContents* contents) { 984 void Browser::TabDeactivated(WebContents* contents) {
983 fullscreen_controller_->OnTabDeactivated(contents); 985 exclusive_access_manager_->OnTabDeactivated(contents);
984 search_delegate_->OnTabDeactivated(contents); 986 search_delegate_->OnTabDeactivated(contents);
985 SearchTabHelper::FromWebContents(contents)->OnTabDeactivated(); 987 SearchTabHelper::FromWebContents(contents)->OnTabDeactivated();
986 988
987 // Save what the user's currently typing, so it can be restored when we 989 // Save what the user's currently typing, so it can be restored when we
988 // switch back to this tab. 990 // switch back to this tab.
989 window_->GetLocationBar()->SaveStateToContents(contents); 991 window_->GetLocationBar()->SaveStateToContents(contents);
990 992
991 if (instant_controller_) 993 if (instant_controller_)
992 instant_controller_->TabDeactivated(contents); 994 instant_controller_->TabDeactivated(contents);
993 } 995 }
994 996
995 void Browser::ActiveTabChanged(WebContents* old_contents, 997 void Browser::ActiveTabChanged(WebContents* old_contents,
996 WebContents* new_contents, 998 WebContents* new_contents,
997 int index, 999 int index,
998 int reason) { 1000 int reason) {
999 content::RecordAction(UserMetricsAction("ActiveTabChanged")); 1001 content::RecordAction(UserMetricsAction("ActiveTabChanged"));
1000 1002
1001 // Update the bookmark state, since the BrowserWindow may query it during 1003 // Update the bookmark state, since the BrowserWindow may query it during
1002 // OnActiveTabChanged() below. 1004 // OnActiveTabChanged() below.
1003 UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_SWITCH); 1005 UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_SWITCH);
1004 1006
1005 // Let the BrowserWindow do its handling. On e.g. views this changes the 1007 // Let the BrowserWindow do its handling. On e.g. views this changes the
1006 // focused object, which should happen before we update the toolbar below, 1008 // focused object, which should happen before we update the toolbar below,
1007 // since the omnibox expects the correct element to already be focused when it 1009 // since the omnibox expects the correct element to already be focused when it
1008 // is updated. 1010 // is updated.
1009 window_->OnActiveTabChanged(old_contents, new_contents, index, reason); 1011 window_->OnActiveTabChanged(old_contents, new_contents, index, reason);
1010 1012
1011 fullscreen_controller_->OnTabDetachedFromView(old_contents); 1013 exclusive_access_manager_->OnTabDetachedFromView(old_contents);
1012 1014
1013 // Discarded tabs always get reloaded. 1015 // Discarded tabs always get reloaded.
1014 if (tab_strip_model_->IsTabDiscarded(index)) { 1016 if (tab_strip_model_->IsTabDiscarded(index)) {
1015 LOG(WARNING) << "Reloading discarded tab at " << index; 1017 LOG(WARNING) << "Reloading discarded tab at " << index;
1016 static int reload_count = 0; 1018 static int reload_count = 0;
1017 UMA_HISTOGRAM_CUSTOM_COUNTS( 1019 UMA_HISTOGRAM_CUSTOM_COUNTS(
1018 "Tabs.Discard.ReloadCount", ++reload_count, 1, 1000, 50); 1020 "Tabs.Discard.ReloadCount", ++reload_count, 1, 1000, 50);
1019 chrome::Reload(this, CURRENT_TAB); 1021 chrome::Reload(this, CURRENT_TAB);
1020 } 1022 }
1021 1023
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 DCHECK(from_index >= 0 && to_index >= 0); 1075 DCHECK(from_index >= 0 && to_index >= 0);
1074 // Notify the history service. 1076 // Notify the history service.
1075 SyncHistoryWithTabs(std::min(from_index, to_index)); 1077 SyncHistoryWithTabs(std::min(from_index, to_index));
1076 } 1078 }
1077 1079
1078 void Browser::TabReplacedAt(TabStripModel* tab_strip_model, 1080 void Browser::TabReplacedAt(TabStripModel* tab_strip_model,
1079 WebContents* old_contents, 1081 WebContents* old_contents,
1080 WebContents* new_contents, 1082 WebContents* new_contents,
1081 int index) { 1083 int index) {
1082 TabDetachedAtImpl(old_contents, index, DETACH_TYPE_REPLACE); 1084 TabDetachedAtImpl(old_contents, index, DETACH_TYPE_REPLACE);
1083 fullscreen_controller_->OnTabClosing(old_contents); 1085 exclusive_access_manager_->OnTabClosing(old_contents);
1084 SessionService* session_service = 1086 SessionService* session_service =
1085 SessionServiceFactory::GetForProfile(profile_); 1087 SessionServiceFactory::GetForProfile(profile_);
1086 if (session_service) 1088 if (session_service)
1087 session_service->TabClosing(old_contents); 1089 session_service->TabClosing(old_contents);
1088 TabInsertedAt(new_contents, 1090 TabInsertedAt(new_contents,
1089 index, 1091 index,
1090 (index == tab_strip_model_->active_index())); 1092 (index == tab_strip_model_->active_index()));
1091 1093
1092 int entry_count = new_contents->GetController().GetEntryCount(); 1094 int entry_count = new_contents->GetController().GetEntryCount();
1093 if (entry_count > 0) { 1095 if (entry_count > 0) {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
1173 Profile* profile = Profile::FromBrowserContext(source->GetBrowserContext()); 1175 Profile* profile = Profile::FromBrowserContext(source->GetBrowserContext());
1174 if (!profile || !source->GetController().GetLastCommittedEntry()) 1176 if (!profile || !source->GetController().GetLastCommittedEntry())
1175 return false; 1177 return false;
1176 GURL committed_url(source->GetController().GetLastCommittedEntry()->GetURL()); 1178 GURL committed_url(source->GetController().GetLastCommittedEntry()->GetURL());
1177 return chrome::IsNTPURL(committed_url, profile); 1179 return chrome::IsNTPURL(committed_url, profile);
1178 } 1180 }
1179 1181
1180 bool Browser::PreHandleKeyboardEvent(content::WebContents* source, 1182 bool Browser::PreHandleKeyboardEvent(content::WebContents* source,
1181 const NativeWebKeyboardEvent& event, 1183 const NativeWebKeyboardEvent& event,
1182 bool* is_keyboard_shortcut) { 1184 bool* is_keyboard_shortcut) {
1183 // Escape exits tabbed fullscreen mode. 1185 // Escape exits tabbed fullscreen mode.
scheib 2015/01/22 22:54:03 and mouse lock, and possibly others.
Sriram 2015/01/23 07:13:43 Done.
1184 // TODO(koz): Write a test for this http://crbug.com/100441. 1186 // TODO(koz): Write a test for this http://crbug.com/100441.
1185 if (event.windowsKeyCode == 27 && 1187 if (event.windowsKeyCode == 27 &&
1186 fullscreen_controller_->HandleUserPressedEscape()) { 1188 exclusive_access_manager_->HandleUserPressedEscape()) {
1187 return true; 1189 return true;
1188 } 1190 }
1189 return window()->PreHandleKeyboardEvent(event, is_keyboard_shortcut); 1191 return window()->PreHandleKeyboardEvent(event, is_keyboard_shortcut);
1190 } 1192 }
1191 1193
1192 void Browser::HandleKeyboardEvent(content::WebContents* source, 1194 void Browser::HandleKeyboardEvent(content::WebContents* source,
1193 const NativeWebKeyboardEvent& event) { 1195 const NativeWebKeyboardEvent& event) {
1194 DevToolsWindow* devtools_window = 1196 DevToolsWindow* devtools_window =
1195 DevToolsWindow::GetInstanceForInspectedWebContents(source); 1197 DevToolsWindow::GetInstanceForInspectedWebContents(source);
1196 bool handled = false; 1198 bool handled = false;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
1254 // Disallow drag-and-drop navigation for Settings windows which do not support 1256 // Disallow drag-and-drop navigation for Settings windows which do not support
1255 // external navigation. 1257 // external navigation.
1256 if ((operations_allowed & blink::WebDragOperationLink) && 1258 if ((operations_allowed & blink::WebDragOperationLink) &&
1257 chrome::SettingsWindowManager::GetInstance()->IsSettingsBrowser(this)) { 1259 chrome::SettingsWindowManager::GetInstance()->IsSettingsBrowser(this)) {
1258 return false; 1260 return false;
1259 } 1261 }
1260 return true; 1262 return true;
1261 } 1263 }
1262 1264
1263 bool Browser::IsMouseLocked() const { 1265 bool Browser::IsMouseLocked() const {
1264 return fullscreen_controller_->IsMouseLocked(); 1266 return exclusive_access_manager_->mouse_lock_controller()->IsMouseLocked();
1265 } 1267 }
1266 1268
1267 void Browser::OnWindowDidShow() { 1269 void Browser::OnWindowDidShow() {
1268 if (window_has_shown_) 1270 if (window_has_shown_)
1269 return; 1271 return;
1270 window_has_shown_ = true; 1272 window_has_shown_ = true;
1271 1273
1272 // CurrentProcessInfo::CreationTime() is missing on some platforms. 1274 // CurrentProcessInfo::CreationTime() is missing on some platforms.
1273 #if defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX) 1275 #if defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX)
1274 // Measure the latency from startup till the first browser window becomes 1276 // Measure the latency from startup till the first browser window becomes
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
1658 const base::FilePath& path) { 1660 const base::FilePath& path) {
1659 FileSelectHelper::EnumerateDirectory(web_contents, request_id, path); 1661 FileSelectHelper::EnumerateDirectory(web_contents, request_id, path);
1660 } 1662 }
1661 1663
1662 bool Browser::EmbedsFullscreenWidget() const { 1664 bool Browser::EmbedsFullscreenWidget() const {
1663 return true; 1665 return true;
1664 } 1666 }
1665 1667
1666 void Browser::EnterFullscreenModeForTab(WebContents* web_contents, 1668 void Browser::EnterFullscreenModeForTab(WebContents* web_contents,
1667 const GURL& origin) { 1669 const GURL& origin) {
1668 fullscreen_controller_->EnterFullscreenModeForTab(web_contents, origin); 1670 exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab(
1671 web_contents, origin);
1669 } 1672 }
1670 1673
1671 void Browser::ExitFullscreenModeForTab(WebContents* web_contents) { 1674 void Browser::ExitFullscreenModeForTab(WebContents* web_contents) {
1672 fullscreen_controller_->ExitFullscreenModeForTab(web_contents); 1675 exclusive_access_manager_->fullscreen_controller()->ExitFullscreenModeForTab(
1676 web_contents);
1673 } 1677 }
1674 1678
1675 bool Browser::IsFullscreenForTabOrPending( 1679 bool Browser::IsFullscreenForTabOrPending(
1676 const WebContents* web_contents) const { 1680 const WebContents* web_contents) const {
1677 return fullscreen_controller_->IsFullscreenForTabOrPending(web_contents); 1681 return exclusive_access_manager_->fullscreen_controller()
1682 ->IsFullscreenForTabOrPending(web_contents);
1678 } 1683 }
1679 1684
1680 void Browser::RegisterProtocolHandler(WebContents* web_contents, 1685 void Browser::RegisterProtocolHandler(WebContents* web_contents,
1681 const std::string& protocol, 1686 const std::string& protocol,
1682 const GURL& url, 1687 const GURL& url,
1683 bool user_gesture) { 1688 bool user_gesture) {
1684 content::BrowserContext* context = web_contents->GetBrowserContext(); 1689 content::BrowserContext* context = web_contents->GetBrowserContext();
1685 if (context->IsOffTheRecord()) 1690 if (context->IsOffTheRecord())
1686 return; 1691 return;
1687 1692
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
1763 find_tab_helper->HandleFindReply(request_id, 1768 find_tab_helper->HandleFindReply(request_id,
1764 number_of_matches, 1769 number_of_matches,
1765 selection_rect, 1770 selection_rect,
1766 active_match_ordinal, 1771 active_match_ordinal,
1767 final_update); 1772 final_update);
1768 } 1773 }
1769 1774
1770 void Browser::RequestToLockMouse(WebContents* web_contents, 1775 void Browser::RequestToLockMouse(WebContents* web_contents,
1771 bool user_gesture, 1776 bool user_gesture,
1772 bool last_unlocked_by_target) { 1777 bool last_unlocked_by_target) {
1773 fullscreen_controller_->RequestToLockMouse(web_contents, 1778 exclusive_access_manager_->mouse_lock_controller()->RequestToLockMouse(
1774 user_gesture, 1779 web_contents, user_gesture, last_unlocked_by_target);
1775 last_unlocked_by_target);
1776 } 1780 }
1777 1781
1778 void Browser::LostMouseLock() { 1782 void Browser::LostMouseLock() {
1779 fullscreen_controller_->LostMouseLock(); 1783 exclusive_access_manager_->mouse_lock_controller()->LostMouseLock();
1780 } 1784 }
1781 1785
1782 void Browser::RequestMediaAccessPermission( 1786 void Browser::RequestMediaAccessPermission(
1783 content::WebContents* web_contents, 1787 content::WebContents* web_contents,
1784 const content::MediaStreamRequest& request, 1788 const content::MediaStreamRequest& request,
1785 const content::MediaResponseCallback& callback) { 1789 const content::MediaResponseCallback& callback) {
1786 ::RequestMediaAccessPermission(web_contents, profile_, request, callback); 1790 ::RequestMediaAccessPermission(web_contents, profile_, request, callback);
1787 } 1791 }
1788 1792
1789 bool Browser::CheckMediaAccessPermission(content::WebContents* web_contents, 1793 bool Browser::CheckMediaAccessPermission(content::WebContents* web_contents,
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
2512 if (contents && !allow_js_access) { 2516 if (contents && !allow_js_access) {
2513 contents->web_contents()->GetController().LoadURL( 2517 contents->web_contents()->GetController().LoadURL(
2514 target_url, 2518 target_url,
2515 content::Referrer(), 2519 content::Referrer(),
2516 ui::PAGE_TRANSITION_LINK, 2520 ui::PAGE_TRANSITION_LINK,
2517 std::string()); // No extra headers. 2521 std::string()); // No extra headers.
2518 } 2522 }
2519 2523
2520 return contents != NULL; 2524 return contents != NULL;
2521 } 2525 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698