| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 #include "chrome/browser/extensions/browser_extension_window_controller.h" | 53 #include "chrome/browser/extensions/browser_extension_window_controller.h" |
| 54 #include "chrome/browser/extensions/extension_prefs.h" | 54 #include "chrome/browser/extensions/extension_prefs.h" |
| 55 #include "chrome/browser/extensions/extension_service.h" | 55 #include "chrome/browser/extensions/extension_service.h" |
| 56 #include "chrome/browser/extensions/extension_system.h" | 56 #include "chrome/browser/extensions/extension_system.h" |
| 57 #include "chrome/browser/extensions/tab_helper.h" | 57 #include "chrome/browser/extensions/tab_helper.h" |
| 58 #include "chrome/browser/favicon/favicon_tab_helper.h" | 58 #include "chrome/browser/favicon/favicon_tab_helper.h" |
| 59 #include "chrome/browser/file_select_helper.h" | 59 #include "chrome/browser/file_select_helper.h" |
| 60 #include "chrome/browser/first_run/first_run.h" | 60 #include "chrome/browser/first_run/first_run.h" |
| 61 #include "chrome/browser/google/google_url_tracker.h" | 61 #include "chrome/browser/google/google_url_tracker.h" |
| 62 #include "chrome/browser/lifetime/application_lifetime.h" | 62 #include "chrome/browser/lifetime/application_lifetime.h" |
| 63 #include "chrome/browser/media/media_capture_devices_dispatcher.h" |
| 63 #include "chrome/browser/net/url_fixer_upper.h" | 64 #include "chrome/browser/net/url_fixer_upper.h" |
| 64 #include "chrome/browser/notifications/notification_ui_manager.h" | 65 #include "chrome/browser/notifications/notification_ui_manager.h" |
| 65 #include "chrome/browser/pepper_broker_infobar_delegate.h" | 66 #include "chrome/browser/pepper_broker_infobar_delegate.h" |
| 66 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 67 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
| 67 #include "chrome/browser/printing/cloud_print/cloud_print_setup_flow.h" | 68 #include "chrome/browser/printing/cloud_print/cloud_print_setup_flow.h" |
| 68 #include "chrome/browser/profiles/profile.h" | 69 #include "chrome/browser/profiles/profile.h" |
| 69 #include "chrome/browser/profiles/profile_destroyer.h" | 70 #include "chrome/browser/profiles/profile_destroyer.h" |
| 70 #include "chrome/browser/profiles/profile_manager.h" | 71 #include "chrome/browser/profiles/profile_manager.h" |
| 71 #include "chrome/browser/profiles/profile_metrics.h" | 72 #include "chrome/browser/profiles/profile_metrics.h" |
| 72 #include "chrome/browser/repost_form_warning_controller.h" | 73 #include "chrome/browser/repost_form_warning_controller.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 #include "chrome/browser/ui/chrome_pages.h" | 108 #include "chrome/browser/ui/chrome_pages.h" |
| 108 #include "chrome/browser/ui/chrome_select_file_policy.h" | 109 #include "chrome/browser/ui/chrome_select_file_policy.h" |
| 109 #include "chrome/browser/ui/extensions/shell_window.h" | 110 #include "chrome/browser/ui/extensions/shell_window.h" |
| 110 #include "chrome/browser/ui/find_bar/find_bar.h" | 111 #include "chrome/browser/ui/find_bar/find_bar.h" |
| 111 #include "chrome/browser/ui/find_bar/find_bar_controller.h" | 112 #include "chrome/browser/ui/find_bar/find_bar_controller.h" |
| 112 #include "chrome/browser/ui/find_bar/find_tab_helper.h" | 113 #include "chrome/browser/ui/find_bar/find_tab_helper.h" |
| 113 #include "chrome/browser/ui/fullscreen/fullscreen_controller.h" | 114 #include "chrome/browser/ui/fullscreen/fullscreen_controller.h" |
| 114 #include "chrome/browser/ui/global_error/global_error.h" | 115 #include "chrome/browser/ui/global_error/global_error.h" |
| 115 #include "chrome/browser/ui/global_error/global_error_service.h" | 116 #include "chrome/browser/ui/global_error/global_error_service.h" |
| 116 #include "chrome/browser/ui/global_error/global_error_service_factory.h" | 117 #include "chrome/browser/ui/global_error/global_error_service_factory.h" |
| 117 #include "chrome/browser/ui/media_stream_infobar_delegate.h" | |
| 118 #include "chrome/browser/ui/omnibox/location_bar.h" | 118 #include "chrome/browser/ui/omnibox/location_bar.h" |
| 119 #include "chrome/browser/ui/screen_capture_infobar_delegate.h" | |
| 120 #include "chrome/browser/ui/search/search_delegate.h" | 119 #include "chrome/browser/ui/search/search_delegate.h" |
| 121 #include "chrome/browser/ui/search/search_model.h" | 120 #include "chrome/browser/ui/search/search_model.h" |
| 122 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" | 121 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" |
| 123 #include "chrome/browser/ui/singleton_tabs.h" | 122 #include "chrome/browser/ui/singleton_tabs.h" |
| 124 #include "chrome/browser/ui/status_bubble.h" | 123 #include "chrome/browser/ui/status_bubble.h" |
| 125 #include "chrome/browser/ui/sync/browser_synced_window_delegate.h" | 124 #include "chrome/browser/ui/sync/browser_synced_window_delegate.h" |
| 126 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" | 125 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" |
| 127 #include "chrome/browser/ui/tab_modal_confirm_dialog.h" | 126 #include "chrome/browser/ui/tab_modal_confirm_dialog.h" |
| 128 #include "chrome/browser/ui/tabs/dock_info.h" | 127 #include "chrome/browser/ui/tabs/dock_info.h" |
| 129 #include "chrome/browser/ui/tabs/tab_menu_model.h" | 128 #include "chrome/browser/ui/tabs/tab_menu_model.h" |
| (...skipping 1457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1587 } | 1586 } |
| 1588 | 1587 |
| 1589 void Browser::LostMouseLock() { | 1588 void Browser::LostMouseLock() { |
| 1590 fullscreen_controller_->LostMouseLock(); | 1589 fullscreen_controller_->LostMouseLock(); |
| 1591 } | 1590 } |
| 1592 | 1591 |
| 1593 void Browser::RequestMediaAccessPermission( | 1592 void Browser::RequestMediaAccessPermission( |
| 1594 content::WebContents* web_contents, | 1593 content::WebContents* web_contents, |
| 1595 const content::MediaStreamRequest& request, | 1594 const content::MediaStreamRequest& request, |
| 1596 const content::MediaResponseCallback& callback) { | 1595 const content::MediaResponseCallback& callback) { |
| 1597 // The case when microphone access is requested together with screen capturing | 1596 MediaCaptureDevicesDispatcher::GetInstance()->RequestAccess( |
| 1598 // is not supported yet. Just check requested video type to decide which | 1597 web_contents, request, callback); |
| 1599 // infobar to show. | |
| 1600 // | |
| 1601 // TODO(sergeyu): Add support for video stream with microphone, e.g. refactor | |
| 1602 // MediaStreamDevicesController to use a single infobar for both permissions, | |
| 1603 // or maybe show two infobars. | |
| 1604 if (request.video_type == content::MEDIA_SCREEN_VIDEO_CAPTURE) | |
| 1605 ScreenCaptureInfoBarDelegate::Create(web_contents, request, callback); | |
| 1606 else | |
| 1607 MediaStreamInfoBarDelegate::Create(web_contents, request, callback); | |
| 1608 } | 1598 } |
| 1609 | 1599 |
| 1610 bool Browser::RequestPpapiBrokerPermission( | 1600 bool Browser::RequestPpapiBrokerPermission( |
| 1611 WebContents* web_contents, | 1601 WebContents* web_contents, |
| 1612 const GURL& url, | 1602 const GURL& url, |
| 1613 const base::FilePath& plugin_path, | 1603 const base::FilePath& plugin_path, |
| 1614 const base::Callback<void(bool)>& callback) { | 1604 const base::Callback<void(bool)>& callback) { |
| 1615 PepperBrokerInfoBarDelegate::Create(web_contents, url, plugin_path, callback); | 1605 PepperBrokerInfoBarDelegate::Create(web_contents, url, plugin_path, callback); |
| 1616 return true; | 1606 return true; |
| 1617 } | 1607 } |
| (...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2234 if (contents && !allow_js_access) { | 2224 if (contents && !allow_js_access) { |
| 2235 contents->web_contents()->GetController().LoadURL( | 2225 contents->web_contents()->GetController().LoadURL( |
| 2236 target_url, | 2226 target_url, |
| 2237 content::Referrer(), | 2227 content::Referrer(), |
| 2238 content::PAGE_TRANSITION_LINK, | 2228 content::PAGE_TRANSITION_LINK, |
| 2239 std::string()); // No extra headers. | 2229 std::string()); // No extra headers. |
| 2240 } | 2230 } |
| 2241 | 2231 |
| 2242 return contents != NULL; | 2232 return contents != NULL; |
| 2243 } | 2233 } |
| OLD | NEW |