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

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

Issue 16234: Reverting my landing (of a patch by external contributer).... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <windows.h> 5 #include <windows.h>
6 #include <shellapi.h> 6 #include <shellapi.h>
7 7
8 #include "chrome/browser/browser.h" 8 #include "chrome/browser/browser.h"
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 } 754 }
755 } 755 }
756 756
757 void Browser::ViewSource() { 757 void Browser::ViewSource() {
758 UserMetrics::RecordAction(L"ViewSource", profile_); 758 UserMetrics::RecordAction(L"ViewSource", profile_);
759 759
760 TabContents* current_tab = GetSelectedTabContents(); 760 TabContents* current_tab = GetSelectedTabContents();
761 NavigationEntry* entry = current_tab->controller()->GetLastCommittedEntry(); 761 NavigationEntry* entry = current_tab->controller()->GetLastCommittedEntry();
762 if (entry) { 762 if (entry) {
763 GURL url("view-source:" + entry->url().spec()); 763 GURL url("view-source:" + entry->url().spec());
764 if (type_ == TYPE_APP) 764 AddTabWithURL(url, GURL(), PageTransition::LINK, true, NULL);
765 OpenURL(url, GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK);
766 else
767 AddTabWithURL(url, GURL(), PageTransition::LINK, true, NULL);
768 } 765 }
769 } 766 }
770 767
771 void Browser::ClosePopups() { 768 void Browser::ClosePopups() {
772 UserMetrics::RecordAction(L"CloseAllSuppressedPopups", profile_); 769 UserMetrics::RecordAction(L"CloseAllSuppressedPopups", profile_);
773 GetSelectedTabContents()->CloseAllSuppressedPopups(); 770 GetSelectedTabContents()->CloseAllSuppressedPopups();
774 } 771 }
775 772
776 void Browser::Print() { 773 void Browser::Print() {
777 UserMetrics::RecordAction(L"PrintPreview", profile_); 774 UserMetrics::RecordAction(L"PrintPreview", profile_);
(...skipping 1608 matching lines...) Expand 10 before | Expand all | Expand 10 after
2386 2383
2387 // We need to register the window position pref. 2384 // We need to register the window position pref.
2388 std::wstring window_pref(prefs::kBrowserWindowPlacement); 2385 std::wstring window_pref(prefs::kBrowserWindowPlacement);
2389 window_pref.append(L"_"); 2386 window_pref.append(L"_");
2390 window_pref.append(app_name); 2387 window_pref.append(app_name);
2391 PrefService* prefs = g_browser_process->local_state(); 2388 PrefService* prefs = g_browser_process->local_state();
2392 DCHECK(prefs); 2389 DCHECK(prefs);
2393 2390
2394 prefs->RegisterDictionaryPref(window_pref.c_str()); 2391 prefs->RegisterDictionaryPref(window_pref.c_str());
2395 } 2392 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698