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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 #include "chrome/browser/google/google_url_tracker.h" | 60 #include "chrome/browser/google/google_url_tracker.h" |
61 #include "chrome/browser/infobars/infobar_tab_helper.h" | 61 #include "chrome/browser/infobars/infobar_tab_helper.h" |
62 #include "chrome/browser/intents/device_attached_intent_source.h" | 62 #include "chrome/browser/intents/device_attached_intent_source.h" |
63 #include "chrome/browser/intents/register_intent_handler_infobar_delegate.h" | 63 #include "chrome/browser/intents/register_intent_handler_infobar_delegate.h" |
64 #include "chrome/browser/intents/web_intents_reporting.h" | 64 #include "chrome/browser/intents/web_intents_reporting.h" |
65 #include "chrome/browser/intents/web_intents_util.h" | 65 #include "chrome/browser/intents/web_intents_util.h" |
66 #include "chrome/browser/lifetime/application_lifetime.h" | 66 #include "chrome/browser/lifetime/application_lifetime.h" |
67 #include "chrome/browser/media/media_stream_devices_controller.h" | 67 #include "chrome/browser/media/media_stream_devices_controller.h" |
68 #include "chrome/browser/net/url_fixer_upper.h" | 68 #include "chrome/browser/net/url_fixer_upper.h" |
69 #include "chrome/browser/notifications/notification_ui_manager.h" | 69 #include "chrome/browser/notifications/notification_ui_manager.h" |
| 70 #include "chrome/browser/pepper_broker_infobar_delegate.h" |
70 #include "chrome/browser/platform_util.h" | 71 #include "chrome/browser/platform_util.h" |
71 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 72 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
72 #include "chrome/browser/prefs/pref_service.h" | 73 #include "chrome/browser/prefs/pref_service.h" |
73 #include "chrome/browser/printing/cloud_print/cloud_print_setup_flow.h" | 74 #include "chrome/browser/printing/cloud_print/cloud_print_setup_flow.h" |
74 #include "chrome/browser/printing/print_preview_tab_controller.h" | 75 #include "chrome/browser/printing/print_preview_tab_controller.h" |
75 #include "chrome/browser/profiles/profile.h" | 76 #include "chrome/browser/profiles/profile.h" |
76 #include "chrome/browser/profiles/profile_destroyer.h" | 77 #include "chrome/browser/profiles/profile_destroyer.h" |
77 #include "chrome/browser/profiles/profile_manager.h" | 78 #include "chrome/browser/profiles/profile_manager.h" |
78 #include "chrome/browser/profiles/profile_metrics.h" | 79 #include "chrome/browser/profiles/profile_metrics.h" |
79 #include "chrome/browser/repost_form_warning_controller.h" | 80 #include "chrome/browser/repost_form_warning_controller.h" |
(...skipping 1671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1751 fullscreen_controller_->LostMouseLock(); | 1752 fullscreen_controller_->LostMouseLock(); |
1752 } | 1753 } |
1753 | 1754 |
1754 void Browser::RequestMediaAccessPermission( | 1755 void Browser::RequestMediaAccessPermission( |
1755 content::WebContents* web_contents, | 1756 content::WebContents* web_contents, |
1756 const content::MediaStreamRequest* request, | 1757 const content::MediaStreamRequest* request, |
1757 const content::MediaResponseCallback& callback) { | 1758 const content::MediaResponseCallback& callback) { |
1758 RequestMediaAccessPermissionHelper(web_contents, request, callback); | 1759 RequestMediaAccessPermissionHelper(web_contents, request, callback); |
1759 } | 1760 } |
1760 | 1761 |
| 1762 bool Browser::RequestPpapiBrokerPermission( |
| 1763 WebContents* web_contents, |
| 1764 const GURL& url, |
| 1765 const FilePath& plugin_path, |
| 1766 const base::Callback<void(bool)>& callback) { |
| 1767 PepperBrokerInfoBarDelegate::Show(web_contents, url, plugin_path, callback); |
| 1768 return true; |
| 1769 } |
| 1770 |
1761 /////////////////////////////////////////////////////////////////////////////// | 1771 /////////////////////////////////////////////////////////////////////////////// |
1762 // Browser, CoreTabHelperDelegate implementation: | 1772 // Browser, CoreTabHelperDelegate implementation: |
1763 | 1773 |
1764 void Browser::SwapTabContents(content::WebContents* old_contents, | 1774 void Browser::SwapTabContents(content::WebContents* old_contents, |
1765 content::WebContents* new_contents) { | 1775 content::WebContents* new_contents) { |
1766 int index = tab_strip_model_->GetIndexOfWebContents(old_contents); | 1776 int index = tab_strip_model_->GetIndexOfWebContents(old_contents); |
1767 DCHECK_NE(TabStripModel::kNoTab, index); | 1777 DCHECK_NE(TabStripModel::kNoTab, index); |
1768 TabContents* new_tab_contents = TabContents::FromWebContents(new_contents); | 1778 TabContents* new_tab_contents = TabContents::FromWebContents(new_contents); |
1769 tab_strip_model_->ReplaceTabContentsAt(index, new_tab_contents); | 1779 tab_strip_model_->ReplaceTabContentsAt(index, new_tab_contents); |
1770 } | 1780 } |
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2357 if (contents && !allow_js_access) { | 2367 if (contents && !allow_js_access) { |
2358 contents->web_contents()->GetController().LoadURL( | 2368 contents->web_contents()->GetController().LoadURL( |
2359 target_url, | 2369 target_url, |
2360 content::Referrer(), | 2370 content::Referrer(), |
2361 content::PAGE_TRANSITION_LINK, | 2371 content::PAGE_TRANSITION_LINK, |
2362 std::string()); // No extra headers. | 2372 std::string()); // No extra headers. |
2363 } | 2373 } |
2364 | 2374 |
2365 return contents != NULL; | 2375 return contents != NULL; |
2366 } | 2376 } |
OLD | NEW |