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

Side by Side Diff: chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc

Issue 10695066: Move SelectFileDialog implementation to ui/base/dialogs/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reupload because weirdness Created 8 years, 5 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/views/ash/chrome_browser_main_extra_parts_ash.h" 5 #include "chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.h"
6 6
7 #include "chrome/browser/chrome_browser_main.h" 7 #include "chrome/browser/chrome_browser_main.h"
8 #include "chrome/browser/toolkit_extra_parts.h" 8 #include "chrome/browser/toolkit_extra_parts.h"
9 #include "chrome/browser/ui/ash/ash_init.h" 9 #include "chrome/browser/ui/ash/ash_init.h"
10 #include "ui/aura/desktop/desktop_screen.h" 10 #include "ui/aura/desktop/desktop_screen.h"
11 #include "ui/aura/desktop/desktop_stacking_client.h" 11 #include "ui/aura/desktop/desktop_stacking_client.h"
12 #include "ui/aura/env.h" 12 #include "ui/aura/env.h"
13 #include "ui/aura/single_display_manager.h" 13 #include "ui/aura/single_display_manager.h"
14 #include "ui/gfx/screen.h" 14 #include "ui/gfx/screen.h"
15 15
16 #if defined(FILE_MANAGER_EXTENSION)
17 #include "chrome/browser/ui/views/select_file_dialog_extension.h"
18 #include "chrome/browser/ui/views/select_file_dialog_extension_factory.h"
19 #endif
20
16 ChromeBrowserMainExtraPartsAsh::ChromeBrowserMainExtraPartsAsh() { 21 ChromeBrowserMainExtraPartsAsh::ChromeBrowserMainExtraPartsAsh() {
17 } 22 }
18 23
19 ChromeBrowserMainExtraPartsAsh::~ChromeBrowserMainExtraPartsAsh() { 24 ChromeBrowserMainExtraPartsAsh::~ChromeBrowserMainExtraPartsAsh() {
20 } 25 }
21 26
22 void ChromeBrowserMainExtraPartsAsh::PreProfileInit() { 27 void ChromeBrowserMainExtraPartsAsh::PreProfileInit() {
23 if (chrome::ShouldOpenAshOnStartup()) { 28 if (chrome::ShouldOpenAshOnStartup()) {
24 chrome::OpenAsh(); 29 chrome::OpenAsh();
25 } else { 30 } else {
26 aura::Env::GetInstance()->SetDisplayManager(new aura::SingleDisplayManager); 31 aura::Env::GetInstance()->SetDisplayManager(new aura::SingleDisplayManager);
27 stacking_client_.reset(new aura::DesktopStackingClient); 32 stacking_client_.reset(new aura::DesktopStackingClient);
28 gfx::Screen::SetInstance(aura::CreateDesktopScreen()); 33 gfx::Screen::SetInstance(aura::CreateDesktopScreen());
29 } 34 }
35
36 #if defined(FILE_MANAGER_EXTENSION)
37 ui::SelectFileDialog::SetFactory(new SelectFileDialogExtensionFactory);
38 #endif
30 } 39 }
31 40
32 void ChromeBrowserMainExtraPartsAsh::PostProfileInit() { 41 void ChromeBrowserMainExtraPartsAsh::PostProfileInit() {
33 } 42 }
34 43
35 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() { 44 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() {
36 chrome::CloseAsh(); 45 chrome::CloseAsh();
37 } 46 }
38 47
39 namespace chrome { 48 namespace chrome {
40 49
41 void AddAshToolkitExtraParts(ChromeBrowserMainParts* main_parts) { 50 void AddAshToolkitExtraParts(ChromeBrowserMainParts* main_parts) {
42 main_parts->AddParts(new ChromeBrowserMainExtraPartsAsh()); 51 main_parts->AddParts(new ChromeBrowserMainExtraPartsAsh());
43 } 52 }
44 53
45 } // namespace chrome 54 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698