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

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

Issue 9701002: Aura/ash split: Split the extra parts into ash and aura parts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to trunk to try again 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
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/views/constrained_window_views.cc » ('j') | 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) 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 #if defined(OS_CHROMEOS) 203 #if defined(OS_CHROMEOS)
204 #include "chrome/browser/chromeos/boot_times_loader.h" 204 #include "chrome/browser/chromeos/boot_times_loader.h"
205 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" 205 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h"
206 #include "chrome/browser/chromeos/dbus/power_manager_client.h" 206 #include "chrome/browser/chromeos/dbus/power_manager_client.h"
207 #if defined(USE_AURA) 207 #if defined(USE_AURA)
208 #include "chrome/browser/extensions/api/terminal/terminal_extension_helper.h" 208 #include "chrome/browser/extensions/api/terminal/terminal_extension_helper.h"
209 #endif 209 #endif
210 #include "chrome/browser/ui/webui/chromeos/active_downloads_ui.h" 210 #include "chrome/browser/ui/webui/chromeos/active_downloads_ui.h"
211 #endif 211 #endif
212 212
213 #if defined(USE_AURA) 213 #if defined(USE_ASH)
214 #include "ash/ash_switches.h" 214 #include "ash/ash_switches.h"
215 #include "ash/shell.h" 215 #include "ash/shell.h"
216 #include "chrome/browser/ui/views/ash/panel_view_aura.h" 216 #include "chrome/browser/ui/views/ash/panel_view_aura.h"
217 #endif 217 #endif
218 218
219 #if !defined(OS_CHROMEOS) || defined(USE_AURA) 219 #if !defined(OS_CHROMEOS) || defined(USE_AURA)
220 #include "chrome/browser/download/download_shelf.h" 220 #include "chrome/browser/download/download_shelf.h"
221 #endif 221 #endif
222 222
223 #if defined(FILE_MANAGER_EXTENSION) 223 #if defined(FILE_MANAGER_EXTENSION)
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 case extension_misc::LAUNCH_SHELL: { 712 case extension_misc::LAUNCH_SHELL: {
713 ShellWindow* shell_window = ShellWindow::Create( 713 ShellWindow* shell_window = ShellWindow::Create(
714 profile, 714 profile,
715 extension, 715 extension,
716 UrlForExtension(extension, override_url)); 716 UrlForExtension(extension, override_url));
717 if (shell_window) 717 if (shell_window)
718 tab = shell_window->web_contents(); 718 tab = shell_window->web_contents();
719 break; 719 break;
720 } 720 }
721 case extension_misc::LAUNCH_PANEL: 721 case extension_misc::LAUNCH_PANEL:
722 #if defined(USE_AURA) 722 #if defined(USE_ASH)
723 if (extension && 723 if (extension &&
724 CommandLine::ForCurrentProcess()->HasSwitch( 724 CommandLine::ForCurrentProcess()->HasSwitch(
725 ash::switches::kAuraPanelManager)) { 725 ash::switches::kAuraPanelManager)) {
726 tab = OpenApplicationPanel(profile, extension, override_url); 726 tab = OpenApplicationPanel(profile, extension, override_url);
727 break; 727 break;
728 } 728 }
729 // else fall through to LAUNCH_WINDOW 729 // else fall through to LAUNCH_WINDOW
730 #endif 730 #endif
731 case extension_misc::LAUNCH_WINDOW: 731 case extension_misc::LAUNCH_WINDOW:
732 tab = Browser::OpenApplicationWindow(profile, extension, container, 732 tab = Browser::OpenApplicationWindow(profile, extension, container,
733 override_url, NULL); 733 override_url, NULL);
734 break; 734 break;
735 case extension_misc::LAUNCH_TAB: { 735 case extension_misc::LAUNCH_TAB: {
736 tab = Browser::OpenApplicationTab(profile, extension, override_url, 736 tab = Browser::OpenApplicationTab(profile, extension, override_url,
737 disposition); 737 disposition);
738 break; 738 break;
739 } 739 }
740 default: 740 default:
741 NOTREACHED(); 741 NOTREACHED();
742 break; 742 break;
743 } 743 }
744 return tab; 744 return tab;
745 } 745 }
746 746
747 #if defined(USE_AURA) 747 #if defined(USE_ASH)
748 // static 748 // static
749 WebContents* Browser::OpenApplicationPanel( 749 WebContents* Browser::OpenApplicationPanel(
750 Profile* profile, 750 Profile* profile,
751 const Extension* extension, 751 const Extension* extension,
752 const GURL& url_input) { 752 const GURL& url_input) {
753 GURL url = UrlForExtension(extension, url_input); 753 GURL url = UrlForExtension(extension, url_input);
754 std::string app_name = 754 std::string app_name =
755 web_app::GenerateApplicationNameFromExtensionId(extension->id()); 755 web_app::GenerateApplicationNameFromExtensionId(extension->id());
756 gfx::Rect panel_bounds; 756 gfx::Rect panel_bounds;
757 panel_bounds.set_width(extension->launch_width()); 757 panel_bounds.set_width(extension->launch_width());
(...skipping 3823 matching lines...) Expand 10 before | Expand all | Expand 10 after
4581 } 4581 }
4582 4582
4583 /////////////////////////////////////////////////////////////////////////////// 4583 ///////////////////////////////////////////////////////////////////////////////
4584 // Browser, protected: 4584 // Browser, protected:
4585 4585
4586 BrowserWindow* Browser::CreateBrowserWindow() { 4586 BrowserWindow* Browser::CreateBrowserWindow() {
4587 // TODO(yfriedman): remove OS_ANDROID clause when browser is excluded from 4587 // TODO(yfriedman): remove OS_ANDROID clause when browser is excluded from
4588 // Android build. 4588 // Android build.
4589 #if !defined(OS_ANDROID) 4589 #if !defined(OS_ANDROID)
4590 bool create_panel = false; 4590 bool create_panel = false;
4591 #if defined(USE_AURA) 4591 #if defined(USE_ASH)
4592 if (CommandLine::ForCurrentProcess()->HasSwitch( 4592 if (CommandLine::ForCurrentProcess()->HasSwitch(
4593 ash::switches::kAuraPanelManager)) 4593 ash::switches::kAuraPanelManager))
4594 create_panel = is_type_panel(); 4594 create_panel = is_type_panel();
4595 #elif !defined(OS_CHROMEOS) 4595 #elif !defined(OS_CHROMEOS)
4596 create_panel = is_type_panel(); 4596 create_panel = is_type_panel();
4597 #endif 4597 #endif
4598 if (create_panel) 4598 if (create_panel)
4599 return PanelManager::GetInstance()->CreatePanel(this); 4599 return PanelManager::GetInstance()->CreatePanel(this);
4600 #endif // OS_ANDROID 4600 #endif // OS_ANDROID
4601 4601
(...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after
5622 } else { 5622 } else {
5623 LoginUIServiceFactory::GetForProfile( 5623 LoginUIServiceFactory::GetForProfile(
5624 profile()->GetOriginalProfile())->ShowLoginUI(); 5624 profile()->GetOriginalProfile())->ShowLoginUI();
5625 } 5625 }
5626 #endif 5626 #endif
5627 } 5627 }
5628 5628
5629 void Browser::ToggleSpeechInput() { 5629 void Browser::ToggleSpeechInput() {
5630 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); 5630 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput();
5631 } 5631 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/views/constrained_window_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698