| 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 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1340 BubbleReference bubble_reference = browser->GetBubbleManager()->ShowBubble( | 1340 BubbleReference bubble_reference = browser->GetBubbleManager()->ShowBubble( |
| 1341 std::move(chooser_bubble_delegate)); | 1341 std::move(chooser_bubble_delegate)); |
| 1342 | 1342 |
| 1343 return std::move(bluetooth_chooser_desktop); | 1343 return std::move(bluetooth_chooser_desktop); |
| 1344 } | 1344 } |
| 1345 | 1345 |
| 1346 void Browser::RequestAppBannerFromDevTools(content::WebContents* web_contents) { | 1346 void Browser::RequestAppBannerFromDevTools(content::WebContents* web_contents) { |
| 1347 banners::AppBannerManagerEmulation::CreateForWebContents(web_contents); | 1347 banners::AppBannerManagerEmulation::CreateForWebContents(web_contents); |
| 1348 banners::AppBannerManagerEmulation* manager = | 1348 banners::AppBannerManagerEmulation* manager = |
| 1349 banners::AppBannerManagerEmulation::FromWebContents(web_contents); | 1349 banners::AppBannerManagerEmulation::FromWebContents(web_contents); |
| 1350 manager->RequestAppBanner(web_contents->GetMainFrame(), | 1350 manager->RequestAppBanner(web_contents->GetLastCommittedURL(), true); |
| 1351 web_contents->GetLastCommittedURL(), true); | |
| 1352 } | 1351 } |
| 1353 | 1352 |
| 1354 bool Browser::IsMouseLocked() const { | 1353 bool Browser::IsMouseLocked() const { |
| 1355 return exclusive_access_manager_->mouse_lock_controller()->IsMouseLocked(); | 1354 return exclusive_access_manager_->mouse_lock_controller()->IsMouseLocked(); |
| 1356 } | 1355 } |
| 1357 | 1356 |
| 1358 void Browser::OnWindowDidShow() { | 1357 void Browser::OnWindowDidShow() { |
| 1359 if (window_has_shown_) | 1358 if (window_has_shown_) |
| 1360 return; | 1359 return; |
| 1361 window_has_shown_ = true; | 1360 window_has_shown_ = true; |
| (...skipping 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2598 if (contents && !allow_js_access) { | 2597 if (contents && !allow_js_access) { |
| 2599 contents->web_contents()->GetController().LoadURL( | 2598 contents->web_contents()->GetController().LoadURL( |
| 2600 target_url, | 2599 target_url, |
| 2601 content::Referrer(), | 2600 content::Referrer(), |
| 2602 ui::PAGE_TRANSITION_LINK, | 2601 ui::PAGE_TRANSITION_LINK, |
| 2603 std::string()); // No extra headers. | 2602 std::string()); // No extra headers. |
| 2604 } | 2603 } |
| 2605 | 2604 |
| 2606 return contents != NULL; | 2605 return contents != NULL; |
| 2607 } | 2606 } |
| OLD | NEW |