| 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 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1367 content::SecurityStyleExplanation( | 1367 content::SecurityStyleExplanation( |
| 1368 l10n_util::GetStringUTF8(IDS_VALID_SERVER_CERTIFICATE), | 1368 l10n_util::GetStringUTF8(IDS_VALID_SERVER_CERTIFICATE), |
| 1369 l10n_util::GetStringUTF8( | 1369 l10n_util::GetStringUTF8( |
| 1370 IDS_VALID_SERVER_CERTIFICATE_DESCRIPTION))); | 1370 IDS_VALID_SERVER_CERTIFICATE_DESCRIPTION))); |
| 1371 } | 1371 } |
| 1372 } | 1372 } |
| 1373 | 1373 |
| 1374 return security_info.security_style; | 1374 return security_info.security_style; |
| 1375 } | 1375 } |
| 1376 | 1376 |
| 1377 void Browser::ShowCertificateViewerInDevTools( |
| 1378 content::WebContents* web_contents, int cert_id) { |
| 1379 DevToolsWindow* devtools_window = |
| 1380 DevToolsWindow::GetInstanceForInspectedWebContents(web_contents); |
| 1381 if (devtools_window) |
| 1382 devtools_window->ShowCertificateViewer(cert_id); |
| 1383 } |
| 1384 |
| 1377 bool Browser::IsMouseLocked() const { | 1385 bool Browser::IsMouseLocked() const { |
| 1378 return exclusive_access_manager_->mouse_lock_controller()->IsMouseLocked(); | 1386 return exclusive_access_manager_->mouse_lock_controller()->IsMouseLocked(); |
| 1379 } | 1387 } |
| 1380 | 1388 |
| 1381 void Browser::OnWindowDidShow() { | 1389 void Browser::OnWindowDidShow() { |
| 1382 if (window_has_shown_) | 1390 if (window_has_shown_) |
| 1383 return; | 1391 return; |
| 1384 window_has_shown_ = true; | 1392 window_has_shown_ = true; |
| 1385 | 1393 |
| 1386 startup_metric_utils::RecordBrowserWindowDisplay(base::Time::Now()); | 1394 startup_metric_utils::RecordBrowserWindowDisplay(base::Time::Now()); |
| (...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2646 if (contents && !allow_js_access) { | 2654 if (contents && !allow_js_access) { |
| 2647 contents->web_contents()->GetController().LoadURL( | 2655 contents->web_contents()->GetController().LoadURL( |
| 2648 target_url, | 2656 target_url, |
| 2649 content::Referrer(), | 2657 content::Referrer(), |
| 2650 ui::PAGE_TRANSITION_LINK, | 2658 ui::PAGE_TRANSITION_LINK, |
| 2651 std::string()); // No extra headers. | 2659 std::string()); // No extra headers. |
| 2652 } | 2660 } |
| 2653 | 2661 |
| 2654 return contents != NULL; | 2662 return contents != NULL; |
| 2655 } | 2663 } |
| OLD | NEW |