Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(599)

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 2444383007: Trigger Dangerous indicator for unsafe subresources (Closed)
Patch Set: protip: #include the .h, not the .cc Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1406 matching lines...) Expand 10 before | Expand all | Expand 10 after
1417 // actions in the face of slow-to-commit pages. 1417 // actions in the face of slow-to-commit pages.
1418 if (changed_flags & (content::INVALIDATE_TYPE_URL | 1418 if (changed_flags & (content::INVALIDATE_TYPE_URL |
1419 content::INVALIDATE_TYPE_LOAD | 1419 content::INVALIDATE_TYPE_LOAD |
1420 content::INVALIDATE_TYPE_TAB)) 1420 content::INVALIDATE_TYPE_TAB))
1421 command_controller_->TabStateChanged(); 1421 command_controller_->TabStateChanged();
1422 1422
1423 if (hosted_app_controller_) 1423 if (hosted_app_controller_)
1424 hosted_app_controller_->UpdateLocationBarVisibility(true); 1424 hosted_app_controller_->UpdateLocationBarVisibility(true);
1425 } 1425 }
1426 1426
1427 void Browser::VisibleSSLStateChanged(WebContents* source) { 1427 void Browser::VisibleSecurityStateChanged(WebContents* source) {
1428 // When the current tab's SSL state changes, we need to update the URL 1428 // When the current tab's security state changes, we need to update the URL
1429 // bar to reflect the new state. 1429 // bar to reflect the new state.
1430 DCHECK(source); 1430 DCHECK(source);
1431 if (tab_strip_model_->GetActiveWebContents() == source) 1431 if (tab_strip_model_->GetActiveWebContents() == source)
1432 UpdateToolbar(false); 1432 UpdateToolbar(false);
1433 1433
1434 ChromeSecurityStateModelClient* security_model = 1434 ChromeSecurityStateModelClient* security_model =
1435 ChromeSecurityStateModelClient::FromWebContents(source); 1435 ChromeSecurityStateModelClient::FromWebContents(source);
1436 security_model->VisibleSSLStateChanged(); 1436 security_model->VisibleSecurityStateChanged();
1437 } 1437 }
1438 1438
1439 void Browser::AddNewContents(WebContents* source, 1439 void Browser::AddNewContents(WebContents* source,
1440 WebContents* new_contents, 1440 WebContents* new_contents,
1441 WindowOpenDisposition disposition, 1441 WindowOpenDisposition disposition,
1442 const gfx::Rect& initial_rect, 1442 const gfx::Rect& initial_rect,
1443 bool user_gesture, 1443 bool user_gesture,
1444 bool* was_blocked) { 1444 bool* was_blocked) {
1445 chrome::AddWebContents(this, source, new_contents, disposition, initial_rect, 1445 chrome::AddWebContents(this, source, new_contents, disposition, initial_rect,
1446 user_gesture, was_blocked); 1446 user_gesture, was_blocked);
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
2577 if (contents && !allow_js_access) { 2577 if (contents && !allow_js_access) {
2578 contents->web_contents()->GetController().LoadURL( 2578 contents->web_contents()->GetController().LoadURL(
2579 target_url, 2579 target_url,
2580 content::Referrer(), 2580 content::Referrer(),
2581 ui::PAGE_TRANSITION_LINK, 2581 ui::PAGE_TRANSITION_LINK,
2582 std::string()); // No extra headers. 2582 std::string()); // No extra headers.
2583 } 2583 }
2584 2584
2585 return contents != NULL; 2585 return contents != NULL;
2586 } 2586 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698