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

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

Issue 9582032: [uber page] Integrate history into uber page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: final tweaks Created 8 years, 9 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 2300 matching lines...) Expand 10 before | Expand all | Expand 10 after
2311 // We record the user metric for this event in WrenchMenu::RunMenu. 2311 // We record the user metric for this event in WrenchMenu::RunMenu.
2312 window_->ShowAppMenu(); 2312 window_->ShowAppMenu();
2313 } 2313 }
2314 2314
2315 void Browser::ShowAvatarMenu() { 2315 void Browser::ShowAvatarMenu() {
2316 window_->ShowAvatarBubbleFromAvatarButton(); 2316 window_->ShowAvatarBubbleFromAvatarButton();
2317 } 2317 }
2318 2318
2319 void Browser::ShowHistoryTab() { 2319 void Browser::ShowHistoryTab() {
2320 content::RecordAction(UserMetricsAction("ShowHistory")); 2320 content::RecordAction(UserMetricsAction("ShowHistory"));
2321 ShowSingletonTabOverwritingNTP( 2321 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableUberPage)) {
2322 GetSingletonTabNavigateParams(GURL(chrome::kChromeUIHistoryURL))); 2322 ShowSingletonTabOverwritingNTP(
2323 GetSingletonTabNavigateParams(GURL(chrome::kChromeUIHistoryFrameURL)));
2324 } else {
2325 browser::NavigateParams params(GetSingletonTabNavigateParams(
2326 GURL(std::string(chrome::kChromeUIUberURL) +
2327 chrome::kChromeUIHistoryHost)));
2328 params.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE;
2329 ShowSingletonTabOverwritingNTP(params);
2330 }
2323 } 2331 }
2324 2332
2325 void Browser::ShowDownloadsTab() { 2333 void Browser::ShowDownloadsTab() {
2326 content::RecordAction(UserMetricsAction("ShowDownloads")); 2334 content::RecordAction(UserMetricsAction("ShowDownloads"));
2327 #if !defined(OS_CHROMEOS) 2335 #if !defined(OS_CHROMEOS)
2328 // ChromiumOS uses ActiveDownloadsUI instead of of DownloadShelf. 2336 // ChromiumOS uses ActiveDownloadsUI instead of of DownloadShelf.
2329 if (window()) { 2337 if (window()) {
2330 DownloadShelf* shelf = window()->GetDownloadShelf(); 2338 DownloadShelf* shelf = window()->GetDownloadShelf();
2331 if (shelf->IsShowing()) 2339 if (shelf->IsShowing())
2332 shelf->Close(); 2340 shelf->Close();
(...skipping 3286 matching lines...) Expand 10 before | Expand all | Expand 10 after
5619 ShowSingletonTabOverwritingNTP(params); 5627 ShowSingletonTabOverwritingNTP(params);
5620 } else { 5628 } else {
5621 LoginUIServiceFactory::GetForProfile( 5629 LoginUIServiceFactory::GetForProfile(
5622 profile()->GetOriginalProfile())->ShowLoginUI(); 5630 profile()->GetOriginalProfile())->ShowLoginUI();
5623 } 5631 }
5624 } 5632 }
5625 5633
5626 void Browser::ToggleSpeechInput() { 5634 void Browser::ToggleSpeechInput() {
5627 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); 5635 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput();
5628 } 5636 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/uber/uber_frame.html ('k') | chrome/browser/ui/browser_navigator_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698