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

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

Issue 7049004: Normalize chrome://foo/ trailing slashes, ChromeURLHostEquals comparison, RIP dead consts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add dummy GURL::SchemeIs for chrome_dll_nacl_win64. Created 9 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <shellapi.h> 8 #include <shellapi.h>
9 #include <windows.h> 9 #include <windows.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 1582 matching lines...) Expand 10 before | Expand all | Expand 10 after
1593 // On X11, setting fullscreen mode is an async call to the X server, which 1593 // On X11, setting fullscreen mode is an async call to the X server, which
1594 // may or may not support fullscreen mode. 1594 // may or may not support fullscreen mode.
1595 #if !defined(USE_X11) 1595 #if !defined(USE_X11)
1596 UpdateCommandsForFullscreenMode(window_->IsFullscreen()); 1596 UpdateCommandsForFullscreenMode(window_->IsFullscreen());
1597 #endif 1597 #endif
1598 } 1598 }
1599 1599
1600 #if defined(OS_CHROMEOS) 1600 #if defined(OS_CHROMEOS)
1601 void Browser::Search() { 1601 void Browser::Search() {
1602 // If the NTP is showing, close it. 1602 // If the NTP is showing, close it.
1603 if (StartsWithASCII(GetSelectedTabContents()->GetURL().spec(), 1603 const GURL& url = GetSelectedTabContents()->GetURL();
1604 chrome::kChromeUINewTabURL, true)) { 1604 if (chrome::IsChromeURL(url, chrome::kChromeUINewTabHost)) {
1605 CloseTab(); 1605 CloseTab();
1606 return; 1606 return;
1607 } 1607 }
1608 1608
1609 // Exit fullscreen to show omnibox. 1609 // Exit fullscreen to show omnibox.
1610 if (window_->IsFullscreen()) { 1610 if (window_->IsFullscreen()) {
1611 ToggleFullscreenMode(); 1611 ToggleFullscreenMode();
1612 // ToggleFullscreenMode is asynchronous, so we don't have omnibox 1612 // ToggleFullscreenMode is asynchronous, so we don't have omnibox
1613 // visible at this point. Wait for next event cycle which toggles 1613 // visible at this point. Wait for next event cycle which toggles
1614 // the visibility of omnibox before creating new tab. 1614 // the visibility of omnibox before creating new tab.
(...skipping 3022 matching lines...) Expand 10 before | Expand all | Expand 10 after
4637 TabContents* current_tab = GetSelectedTabContents(); 4637 TabContents* current_tab = GetSelectedTabContents();
4638 if (current_tab) { 4638 if (current_tab) {
4639 content_restrictions = current_tab->content_restrictions(); 4639 content_restrictions = current_tab->content_restrictions();
4640 NavigationEntry* active_entry = current_tab->controller().GetActiveEntry(); 4640 NavigationEntry* active_entry = current_tab->controller().GetActiveEntry();
4641 // See comment in UpdateCommandsForTabState about why we call url(). 4641 // See comment in UpdateCommandsForTabState about why we call url().
4642 if (!SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL())) 4642 if (!SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL()))
4643 content_restrictions |= CONTENT_RESTRICTION_SAVE; 4643 content_restrictions |= CONTENT_RESTRICTION_SAVE;
4644 } 4644 }
4645 return content_restrictions; 4645 return content_restrictions;
4646 } 4646 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698