OLD | NEW |
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 957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
968 find_tab_helper->HandleFindReply(request_id, | 968 find_tab_helper->HandleFindReply(request_id, |
969 number_of_matches, | 969 number_of_matches, |
970 selection_rect, | 970 selection_rect, |
971 active_match_ordinal, | 971 active_match_ordinal, |
972 final_update); | 972 final_update); |
973 } | 973 } |
974 | 974 |
975 // static | 975 // static |
976 void Browser::RequestMediaAccessPermissionHelper( | 976 void Browser::RequestMediaAccessPermissionHelper( |
977 content::WebContents* web_contents, | 977 content::WebContents* web_contents, |
978 const content::MediaStreamRequest* request, | 978 const content::MediaStreamRequest& request, |
979 const content::MediaResponseCallback& callback) { | 979 const content::MediaResponseCallback& callback) { |
980 Profile* profile = | 980 Profile* profile = |
981 Profile::FromBrowserContext(web_contents->GetBrowserContext()); | 981 Profile::FromBrowserContext(web_contents->GetBrowserContext()); |
982 | 982 |
983 scoped_ptr<MediaStreamDevicesController> | 983 scoped_ptr<MediaStreamDevicesController> |
984 controller(new MediaStreamDevicesController(profile, | 984 controller(new MediaStreamDevicesController(profile, |
985 request, | 985 request, |
986 callback)); | 986 callback)); |
987 if (!controller->DismissInfoBarAndTakeActionOnSettings()) { | 987 if (!controller->DismissInfoBarAndTakeActionOnSettings()) { |
988 InfoBarService* infobar_service = | 988 InfoBarService* infobar_service = |
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1779 user_gesture, | 1779 user_gesture, |
1780 last_unlocked_by_target); | 1780 last_unlocked_by_target); |
1781 } | 1781 } |
1782 | 1782 |
1783 void Browser::LostMouseLock() { | 1783 void Browser::LostMouseLock() { |
1784 fullscreen_controller_->LostMouseLock(); | 1784 fullscreen_controller_->LostMouseLock(); |
1785 } | 1785 } |
1786 | 1786 |
1787 void Browser::RequestMediaAccessPermission( | 1787 void Browser::RequestMediaAccessPermission( |
1788 content::WebContents* web_contents, | 1788 content::WebContents* web_contents, |
1789 const content::MediaStreamRequest* request, | 1789 const content::MediaStreamRequest& request, |
1790 const content::MediaResponseCallback& callback) { | 1790 const content::MediaResponseCallback& callback) { |
1791 RequestMediaAccessPermissionHelper(web_contents, request, callback); | 1791 RequestMediaAccessPermissionHelper(web_contents, request, callback); |
1792 } | 1792 } |
1793 | 1793 |
1794 bool Browser::RequestPpapiBrokerPermission( | 1794 bool Browser::RequestPpapiBrokerPermission( |
1795 WebContents* web_contents, | 1795 WebContents* web_contents, |
1796 const GURL& url, | 1796 const GURL& url, |
1797 const FilePath& plugin_path, | 1797 const FilePath& plugin_path, |
1798 const base::Callback<void(bool)>& callback) { | 1798 const base::Callback<void(bool)>& callback) { |
1799 PepperBrokerInfoBarDelegate::Show(web_contents, url, plugin_path, callback); | 1799 PepperBrokerInfoBarDelegate::Show(web_contents, url, plugin_path, callback); |
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2438 if (contents && !allow_js_access) { | 2438 if (contents && !allow_js_access) { |
2439 contents->web_contents()->GetController().LoadURL( | 2439 contents->web_contents()->GetController().LoadURL( |
2440 target_url, | 2440 target_url, |
2441 content::Referrer(), | 2441 content::Referrer(), |
2442 content::PAGE_TRANSITION_LINK, | 2442 content::PAGE_TRANSITION_LINK, |
2443 std::string()); // No extra headers. | 2443 std::string()); // No extra headers. |
2444 } | 2444 } |
2445 | 2445 |
2446 return contents != NULL; | 2446 return contents != NULL; |
2447 } | 2447 } |
OLD | NEW |