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

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

Issue 2068004: Commiting http://codereview.chromium.org/2017007/show on behalf of rkc@chromi... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/browser.h" 5 #include "chrome/browser/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 1591 matching lines...) Expand 10 before | Expand all | Expand 10 after
1602 1602
1603 void Browser::OpenNewProfileDialog() { 1603 void Browser::OpenNewProfileDialog() {
1604 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 1604 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
1605 if (!command_line.HasSwitch(switches::kEnableUserDataDirProfiles)) 1605 if (!command_line.HasSwitch(switches::kEnableUserDataDirProfiles))
1606 return; 1606 return;
1607 UserMetrics::RecordAction(UserMetricsAction("CreateProfile"), profile_); 1607 UserMetrics::RecordAction(UserMetricsAction("CreateProfile"), profile_);
1608 window_->ShowNewProfileDialog(); 1608 window_->ShowNewProfileDialog();
1609 } 1609 }
1610 1610
1611 void Browser::OpenBugReportDialog() { 1611 void Browser::OpenBugReportDialog() {
1612 #if defined(OS_CHROMEOS)
1613 UserMetrics::RecordAction(UserMetricsAction("ReportBug"), profile_);
1614 window_->ShowReportBugDialog();
1615 #else
1612 TabContents* contents = GetSelectedTabContents(); 1616 TabContents* contents = GetSelectedTabContents();
1613 if (!contents) 1617 if (!contents)
1614 return; 1618 return;
1615 ShowBrokenPageTab(contents); 1619 ShowBrokenPageTab(contents);
1620 #endif
1616 } 1621 }
1617 1622
1618 void Browser::ToggleBookmarkBar() { 1623 void Browser::ToggleBookmarkBar() {
1619 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarksBar"), profile_); 1624 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarksBar"), profile_);
1620 window_->ToggleBookmarkBar(); 1625 window_->ToggleBookmarkBar();
1621 } 1626 }
1622 1627
1623 void Browser::ToggleExtensionShelf() { 1628 void Browser::ToggleExtensionShelf() {
1624 UserMetrics::RecordAction(UserMetricsAction("ToggleExtensionShelf"), 1629 UserMetrics::RecordAction(UserMetricsAction("ToggleExtensionShelf"),
1625 profile_); 1630 profile_);
(...skipping 2211 matching lines...) Expand 10 before | Expand all | Expand 10 after
3837 if (TabHasUnloadListener(contents)) { 3842 if (TabHasUnloadListener(contents)) {
3838 // If the page has unload listeners, then we tell the renderer to fire 3843 // If the page has unload listeners, then we tell the renderer to fire
3839 // them. Once they have fired, we'll get a message back saying whether 3844 // them. Once they have fired, we'll get a message back saying whether
3840 // to proceed closing the page or not, which sends us back to this method 3845 // to proceed closing the page or not, which sends us back to this method
3841 // with the HasUnloadListener bit cleared. 3846 // with the HasUnloadListener bit cleared.
3842 contents->render_view_host()->FirePageBeforeUnload(false); 3847 contents->render_view_host()->FirePageBeforeUnload(false);
3843 return true; 3848 return true;
3844 } 3849 }
3845 return false; 3850 return false;
3846 } 3851 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698