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

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

Issue 9590001: Launch panels as popup windows in Aura, and add separate launcher icon logic for panels. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Eliminate ash::TYPE_PANEL 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
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 4577 matching lines...) Expand 10 before | Expand all | Expand 10 after
4588 void Browser::ShowFirstRunBubble() { 4588 void Browser::ShowFirstRunBubble() {
4589 window()->GetLocationBar()->ShowFirstRunBubble(); 4589 window()->GetLocationBar()->ShowFirstRunBubble();
4590 } 4590 }
4591 4591
4592 /////////////////////////////////////////////////////////////////////////////// 4592 ///////////////////////////////////////////////////////////////////////////////
4593 // Browser, protected: 4593 // Browser, protected:
4594 4594
4595 BrowserWindow* Browser::CreateBrowserWindow() { 4595 BrowserWindow* Browser::CreateBrowserWindow() {
4596 // TODO(yfriedman): remove OS_ANDROID clause when browser is excluded from 4596 // TODO(yfriedman): remove OS_ANDROID clause when browser is excluded from
4597 // Android build. 4597 // Android build.
4598 #if (!defined(OS_CHROMEOS) || defined(USE_AURA)) && !defined(OS_ANDROID) 4598 #if !defined(OS_ANDROID)
4599 if (is_type_panel()) 4599 bool create_panel = false;
4600 #if defined(USE_AURA)
4601 if (CommandLine::ForCurrentProcess()->HasSwitch(
4602 ash::switches::kAuraPanelManager))
4603 create_panel = is_type_panel();
4604 #elif !defined(OS_CHROMEOS)
4605 create_panel = is_type_panel();
4606 #endif
4607 if (create_panel)
4600 return PanelManager::GetInstance()->CreatePanel(this); 4608 return PanelManager::GetInstance()->CreatePanel(this);
4601 #endif 4609 #endif // OS_ANDROID
4602 4610
4603 return BrowserWindow::CreateBrowserWindow(this); 4611 return BrowserWindow::CreateBrowserWindow(this);
4604 } 4612 }
4605 4613
4606 4614
4607 /////////////////////////////////////////////////////////////////////////////// 4615 ///////////////////////////////////////////////////////////////////////////////
4608 // Browser, Command and state updating (private): 4616 // Browser, Command and state updating (private):
4609 4617
4610 void Browser::InitCommandState() { 4618 void Browser::InitCommandState() {
4611 // All browser commands whose state isn't set automagically some other way 4619 // All browser commands whose state isn't set automagically some other way
(...skipping 1007 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

Powered by Google App Engine
This is Rietveld 408576698