| 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 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "base/threading/thread_task_runner_handle.h" | 28 #include "base/threading/thread_task_runner_handle.h" |
| 29 #include "base/time/time.h" | 29 #include "base/time/time.h" |
| 30 #include "build/build_config.h" | 30 #include "build/build_config.h" |
| 31 #include "chrome/app/chrome_command_ids.h" | 31 #include "chrome/app/chrome_command_ids.h" |
| 32 #include "chrome/browser/app_mode/app_mode_utils.h" | 32 #include "chrome/browser/app_mode/app_mode_utils.h" |
| 33 #include "chrome/browser/autofill/personal_data_manager_factory.h" | 33 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
| 34 #include "chrome/browser/background/background_contents.h" | 34 #include "chrome/browser/background/background_contents.h" |
| 35 #include "chrome/browser/background/background_contents_service.h" | 35 #include "chrome/browser/background/background_contents_service.h" |
| 36 #include "chrome/browser/background/background_contents_service_factory.h" | 36 #include "chrome/browser/background/background_contents_service_factory.h" |
| 37 #include "chrome/browser/banners/app_banner_manager_desktop.h" | 37 #include "chrome/browser/banners/app_banner_manager_desktop.h" |
| 38 #include "chrome/browser/bluetooth/bluetooth_allowed_devices_map.h" |
| 39 #include "chrome/browser/bluetooth/bluetooth_allowed_devices_map_factory.h" |
| 38 #include "chrome/browser/browser_process.h" | 40 #include "chrome/browser/browser_process.h" |
| 39 #include "chrome/browser/browser_shutdown.h" | 41 #include "chrome/browser/browser_shutdown.h" |
| 40 #include "chrome/browser/chrome_notification_types.h" | 42 #include "chrome/browser/chrome_notification_types.h" |
| 41 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 43 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| 42 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 44 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
| 43 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" | 45 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" |
| 44 #include "chrome/browser/custom_handlers/register_protocol_handler_permission_re
quest.h" | 46 #include "chrome/browser/custom_handlers/register_protocol_handler_permission_re
quest.h" |
| 45 #include "chrome/browser/defaults.h" | 47 #include "chrome/browser/defaults.h" |
| 46 #include "chrome/browser/devtools/devtools_toggle_action.h" | 48 #include "chrome/browser/devtools/devtools_toggle_action.h" |
| 47 #include "chrome/browser/devtools/devtools_window.h" | 49 #include "chrome/browser/devtools/devtools_window.h" |
| (...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1333 std::move(bluetooth_chooser_controller))); | 1335 std::move(bluetooth_chooser_controller))); |
| 1334 | 1336 |
| 1335 Browser* browser = chrome::FindBrowserWithWebContents( | 1337 Browser* browser = chrome::FindBrowserWithWebContents( |
| 1336 WebContents::FromRenderFrameHost(frame)); | 1338 WebContents::FromRenderFrameHost(frame)); |
| 1337 BubbleReference bubble_reference = browser->GetBubbleManager()->ShowBubble( | 1339 BubbleReference bubble_reference = browser->GetBubbleManager()->ShowBubble( |
| 1338 std::move(chooser_bubble_delegate)); | 1340 std::move(chooser_bubble_delegate)); |
| 1339 | 1341 |
| 1340 return std::move(bluetooth_chooser_desktop); | 1342 return std::move(bluetooth_chooser_desktop); |
| 1341 } | 1343 } |
| 1342 | 1344 |
| 1345 content::BluetoothAllowedDevicesMapBase* Browser::GetBluetoothDevicesMap( |
| 1346 content::RenderFrameHost* frame) { |
| 1347 return BluetoothAllowedDevicesMapFactory::GetForProfile( |
| 1348 frame->GetProcess()->GetBrowserContext()); |
| 1349 } |
| 1350 |
| 1343 void Browser::RequestAppBannerFromDevTools(content::WebContents* web_contents) { | 1351 void Browser::RequestAppBannerFromDevTools(content::WebContents* web_contents) { |
| 1344 banners::AppBannerManagerDesktop::CreateForWebContents(web_contents); | 1352 banners::AppBannerManagerDesktop::CreateForWebContents(web_contents); |
| 1345 banners::AppBannerManagerDesktop* manager = | 1353 banners::AppBannerManagerDesktop* manager = |
| 1346 banners::AppBannerManagerDesktop::FromWebContents(web_contents); | 1354 banners::AppBannerManagerDesktop::FromWebContents(web_contents); |
| 1347 manager->RequestAppBanner(web_contents->GetLastCommittedURL(), true); | 1355 manager->RequestAppBanner(web_contents->GetLastCommittedURL(), true); |
| 1348 } | 1356 } |
| 1349 | 1357 |
| 1350 bool Browser::IsMouseLocked() const { | 1358 bool Browser::IsMouseLocked() const { |
| 1351 return exclusive_access_manager_->mouse_lock_controller()->IsMouseLocked(); | 1359 return exclusive_access_manager_->mouse_lock_controller()->IsMouseLocked(); |
| 1352 } | 1360 } |
| (...skipping 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2619 // new window later, thus we need to navigate the window now. | 2627 // new window later, thus we need to navigate the window now. |
| 2620 if (contents) { | 2628 if (contents) { |
| 2621 contents->web_contents()->GetController().LoadURL( | 2629 contents->web_contents()->GetController().LoadURL( |
| 2622 target_url, content::Referrer(), ui::PAGE_TRANSITION_LINK, | 2630 target_url, content::Referrer(), ui::PAGE_TRANSITION_LINK, |
| 2623 std::string()); // No extra headers. | 2631 std::string()); // No extra headers. |
| 2624 } | 2632 } |
| 2625 } | 2633 } |
| 2626 | 2634 |
| 2627 return contents != NULL; | 2635 return contents != NULL; |
| 2628 } | 2636 } |
| OLD | NEW |