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

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

Issue 1838043002: Disabled "Print" option in wrench menu for a crashed page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disabled "Print" option in wrench menu for a crashed page. Created 4 years, 8 months 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
« no previous file with comments | « no previous file | chrome/browser/ui/browser_commands.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1534 matching lines...) Expand 10 before | Expand all | Expand 10 after
1545 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466285 1545 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466285
1546 // is fixed. 1546 // is fixed.
1547 tracked_objects::ScopedTracker tracking_profile2( 1547 tracked_objects::ScopedTracker tracking_profile2(
1548 FROM_HERE_WITH_EXPLICIT_FUNCTION( 1548 FROM_HERE_WITH_EXPLICIT_FUNCTION(
1549 "466285 Browser::NavigationStateChanged::TabStateChanged")); 1549 "466285 Browser::NavigationStateChanged::TabStateChanged"));
1550 // We can synchronously update commands since they will only change once per 1550 // We can synchronously update commands since they will only change once per
1551 // navigation, so we don't have to worry about flickering. We do, however, 1551 // navigation, so we don't have to worry about flickering. We do, however,
1552 // need to update the command state early on load to always present usable 1552 // need to update the command state early on load to always present usable
1553 // actions in the face of slow-to-commit pages. 1553 // actions in the face of slow-to-commit pages.
1554 if (changed_flags & (content::INVALIDATE_TYPE_URL | 1554 if (changed_flags & (content::INVALIDATE_TYPE_URL |
1555 content::INVALIDATE_TYPE_LOAD)) 1555 content::INVALIDATE_TYPE_LOAD |
1556 content::INVALIDATE_TYPE_TAB))
1556 command_controller_->TabStateChanged(); 1557 command_controller_->TabStateChanged();
1557 1558
1558 if (hosted_app_controller_) 1559 if (hosted_app_controller_)
1559 hosted_app_controller_->UpdateLocationBarVisibility(true); 1560 hosted_app_controller_->UpdateLocationBarVisibility(true);
1560 } 1561 }
1561 1562
1562 void Browser::VisibleSSLStateChanged(const WebContents* source) { 1563 void Browser::VisibleSSLStateChanged(const WebContents* source) {
1563 // When the current tab's SSL state changes, we need to update the URL 1564 // When the current tab's SSL state changes, we need to update the URL
1564 // bar to reflect the new state. 1565 // bar to reflect the new state.
1565 DCHECK(source); 1566 DCHECK(source);
(...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after
2740 if (contents && !allow_js_access) { 2741 if (contents && !allow_js_access) {
2741 contents->web_contents()->GetController().LoadURL( 2742 contents->web_contents()->GetController().LoadURL(
2742 target_url, 2743 target_url,
2743 content::Referrer(), 2744 content::Referrer(),
2744 ui::PAGE_TRANSITION_LINK, 2745 ui::PAGE_TRANSITION_LINK,
2745 std::string()); // No extra headers. 2746 std::string()); // No extra headers.
2746 } 2747 }
2747 2748
2748 return contents != NULL; 2749 return contents != NULL;
2749 } 2750 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/browser_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698