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 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1418 content::WebContents* web_contents, int cert_id) { | 1418 content::WebContents* web_contents, int cert_id) { |
1419 DevToolsWindow* devtools_window = | 1419 DevToolsWindow* devtools_window = |
1420 DevToolsWindow::GetInstanceForInspectedWebContents(web_contents); | 1420 DevToolsWindow::GetInstanceForInspectedWebContents(web_contents); |
1421 if (devtools_window) | 1421 if (devtools_window) |
1422 devtools_window->ShowCertificateViewer(cert_id); | 1422 devtools_window->ShowCertificateViewer(cert_id); |
1423 } | 1423 } |
1424 | 1424 |
1425 scoped_ptr<content::BluetoothChooser> Browser::RunBluetoothChooser( | 1425 scoped_ptr<content::BluetoothChooser> Browser::RunBluetoothChooser( |
1426 content::WebContents* web_contents, | 1426 content::WebContents* web_contents, |
1427 const content::BluetoothChooser::EventHandler& event_handler, | 1427 const content::BluetoothChooser::EventHandler& event_handler, |
1428 const GURL& origin) { | 1428 const url::Origin& origin) { |
1429 scoped_ptr<BluetoothChooserDesktop> bluetooth_chooser_desktop( | 1429 scoped_ptr<BluetoothChooserDesktop> bluetooth_chooser_desktop( |
1430 new BluetoothChooserDesktop(event_handler)); | 1430 new BluetoothChooserDesktop(event_handler)); |
1431 Browser* browser = chrome::FindBrowserWithWebContents(web_contents); | 1431 Browser* browser = chrome::FindBrowserWithWebContents(web_contents); |
1432 scoped_ptr<BluetoothChooserBubbleDelegate> bubble_delegate( | 1432 scoped_ptr<BluetoothChooserBubbleDelegate> bubble_delegate( |
1433 new BluetoothChooserBubbleDelegate(browser)); | 1433 new BluetoothChooserBubbleDelegate(browser)); |
1434 BluetoothChooserBubbleDelegate* bubble_delegate_ptr = bubble_delegate.get(); | 1434 BluetoothChooserBubbleDelegate* bubble_delegate_ptr = bubble_delegate.get(); |
1435 | 1435 |
1436 // Wire the ChooserBubbleDelegate to the BluetoothChooser. | 1436 // Wire the ChooserBubbleDelegate to the BluetoothChooser. |
1437 bluetooth_chooser_desktop->set_bluetooth_chooser_bubble_delegate( | 1437 bluetooth_chooser_desktop->set_bluetooth_chooser_bubble_delegate( |
1438 bubble_delegate_ptr); | 1438 bubble_delegate_ptr); |
(...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2737 if (contents && !allow_js_access) { | 2737 if (contents && !allow_js_access) { |
2738 contents->web_contents()->GetController().LoadURL( | 2738 contents->web_contents()->GetController().LoadURL( |
2739 target_url, | 2739 target_url, |
2740 content::Referrer(), | 2740 content::Referrer(), |
2741 ui::PAGE_TRANSITION_LINK, | 2741 ui::PAGE_TRANSITION_LINK, |
2742 std::string()); // No extra headers. | 2742 std::string()); // No extra headers. |
2743 } | 2743 } |
2744 | 2744 |
2745 return contents != NULL; | 2745 return contents != NULL; |
2746 } | 2746 } |
OLD | NEW |