| 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 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1275 WebContents* web_contents, | 1275 WebContents* web_contents, |
| 1276 content::SecurityStyleExplanations* security_style_explanations) { | 1276 content::SecurityStyleExplanations* security_style_explanations) { |
| 1277 ChromeSecurityStateModelClient* model_client = | 1277 ChromeSecurityStateModelClient* model_client = |
| 1278 ChromeSecurityStateModelClient::FromWebContents(web_contents); | 1278 ChromeSecurityStateModelClient::FromWebContents(web_contents); |
| 1279 DCHECK(model_client); | 1279 DCHECK(model_client); |
| 1280 return model_client->GetSecurityStyle(model_client->GetSecurityInfo(), | 1280 return model_client->GetSecurityStyle(model_client->GetSecurityInfo(), |
| 1281 security_style_explanations); | 1281 security_style_explanations); |
| 1282 } | 1282 } |
| 1283 | 1283 |
| 1284 void Browser::ShowCertificateViewerInDevTools( | 1284 void Browser::ShowCertificateViewerInDevTools( |
| 1285 content::WebContents* web_contents, int cert_id) { | 1285 content::WebContents* web_contents, |
| 1286 scoped_refptr<net::X509Certificate> certificate) { |
| 1286 DevToolsWindow* devtools_window = | 1287 DevToolsWindow* devtools_window = |
| 1287 DevToolsWindow::GetInstanceForInspectedWebContents(web_contents); | 1288 DevToolsWindow::GetInstanceForInspectedWebContents(web_contents); |
| 1288 if (devtools_window) | 1289 if (devtools_window) |
| 1289 devtools_window->ShowCertificateViewer(cert_id); | 1290 devtools_window->ShowCertificateViewer(certificate); |
| 1290 } | 1291 } |
| 1291 | 1292 |
| 1292 std::unique_ptr<content::BluetoothChooser> Browser::RunBluetoothChooser( | 1293 std::unique_ptr<content::BluetoothChooser> Browser::RunBluetoothChooser( |
| 1293 content::RenderFrameHost* frame, | 1294 content::RenderFrameHost* frame, |
| 1294 const content::BluetoothChooser::EventHandler& event_handler) { | 1295 const content::BluetoothChooser::EventHandler& event_handler) { |
| 1295 std::unique_ptr<BluetoothChooserController> bluetooth_chooser_controller( | 1296 std::unique_ptr<BluetoothChooserController> bluetooth_chooser_controller( |
| 1296 new BluetoothChooserController(frame, event_handler)); | 1297 new BluetoothChooserController(frame, event_handler)); |
| 1297 | 1298 |
| 1298 std::unique_ptr<BluetoothChooserDesktop> bluetooth_chooser_desktop( | 1299 std::unique_ptr<BluetoothChooserDesktop> bluetooth_chooser_desktop( |
| 1299 new BluetoothChooserDesktop(bluetooth_chooser_controller.get())); | 1300 new BluetoothChooserDesktop(bluetooth_chooser_controller.get())); |
| (...skipping 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2564 if (contents && !allow_js_access) { | 2565 if (contents && !allow_js_access) { |
| 2565 contents->web_contents()->GetController().LoadURL( | 2566 contents->web_contents()->GetController().LoadURL( |
| 2566 target_url, | 2567 target_url, |
| 2567 content::Referrer(), | 2568 content::Referrer(), |
| 2568 ui::PAGE_TRANSITION_LINK, | 2569 ui::PAGE_TRANSITION_LINK, |
| 2569 std::string()); // No extra headers. | 2570 std::string()); // No extra headers. |
| 2570 } | 2571 } |
| 2571 | 2572 |
| 2572 return contents != NULL; | 2573 return contents != NULL; |
| 2573 } | 2574 } |
| OLD | NEW |