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

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

Issue 2563783002: ui + mus: Split ContextFactory into ContextFactory(Client) and ContextFactoryPrivate (Closed)
Patch Set: Restore mash Created 4 years 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
« no previous file with comments | « ash/test/ash_test_helper.cc ('k') | chrome/browser/ui/views/chrome_views_delegate.h » ('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/ash/ash_init.h" 5 #include "chrome/browser/ui/ash/ash_init.h"
6 6
7 #include "ash/accelerators/accelerator_controller_delegate_aura.h" 7 #include "ash/accelerators/accelerator_controller_delegate_aura.h"
8 #include "ash/common/accelerators/accelerator_controller.h" 8 #include "ash/common/accelerators/accelerator_controller.h"
9 #include "ash/common/accessibility_types.h" 9 #include "ash/common/accessibility_types.h"
10 #include "ash/common/wm_shell.h" 10 #include "ash/common/wm_shell.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 if (!chromeos::LoginState::Get()->IsUserLoggedIn()) 55 if (!chromeos::LoginState::Get()->IsUserLoggedIn())
56 ash::Shell::set_initially_hide_cursor(true); 56 ash::Shell::set_initially_hide_cursor(true);
57 57
58 // Balanced by a call to DestroyInstance() in CloseAsh() below. 58 // Balanced by a call to DestroyInstance() in CloseAsh() below.
59 ash::ShellContentState::SetInstance(new ChromeShellContentState); 59 ash::ShellContentState::SetInstance(new ChromeShellContentState);
60 60
61 ash::ShellInitParams shell_init_params; 61 ash::ShellInitParams shell_init_params;
62 // Shell takes ownership of ChromeShellDelegate. 62 // Shell takes ownership of ChromeShellDelegate.
63 shell_init_params.delegate = new ChromeShellDelegate; 63 shell_init_params.delegate = new ChromeShellDelegate;
64 shell_init_params.context_factory = content::GetContextFactory(); 64 shell_init_params.context_factory = content::GetContextFactory();
65 shell_init_params.context_factory_private =
66 content::GetContextFactoryPrivate();
65 shell_init_params.blocking_pool = content::BrowserThread::GetBlockingPool(); 67 shell_init_params.blocking_pool = content::BrowserThread::GetBlockingPool();
66 68
67 ash::Shell* shell = ash::Shell::CreateInstance(shell_init_params); 69 ash::Shell* shell = ash::Shell::CreateInstance(shell_init_params);
68 shell->accelerator_controller_delegate()->SetScreenshotDelegate( 70 shell->accelerator_controller_delegate()->SetScreenshotDelegate(
69 std::unique_ptr<ash::ScreenshotDelegate>(new ChromeScreenshotGrabber)); 71 std::unique_ptr<ash::ScreenshotDelegate>(new ChromeScreenshotGrabber));
70 // TODO(flackr): Investigate exposing a blocking pool task runner to chromeos. 72 // TODO(flackr): Investigate exposing a blocking pool task runner to chromeos.
71 chromeos::AccelerometerReader::GetInstance()->Initialize( 73 chromeos::AccelerometerReader::GetInstance()->Initialize(
72 content::BrowserThread::GetBlockingPool() 74 content::BrowserThread::GetBlockingPool()
73 ->GetSequencedTaskRunnerWithShutdownBehavior( 75 ->GetSequencedTaskRunnerWithShutdownBehavior(
74 content::BrowserThread::GetBlockingPool()->GetSequenceToken(), 76 content::BrowserThread::GetBlockingPool()->GetSequenceToken(),
(...skipping 21 matching lines...) Expand all
96 } 98 }
97 99
98 void CloseAsh() { 100 void CloseAsh() {
99 if (ash::Shell::HasInstance()) { 101 if (ash::Shell::HasInstance()) {
100 ash::Shell::DeleteInstance(); 102 ash::Shell::DeleteInstance();
101 ash::ShellContentState::DestroyInstance(); 103 ash::ShellContentState::DestroyInstance();
102 } 104 }
103 } 105 }
104 106
105 } // namespace chrome 107 } // namespace chrome
OLDNEW
« no previous file with comments | « ash/test/ash_test_helper.cc ('k') | chrome/browser/ui/views/chrome_views_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698