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

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

Issue 2615663002: Fix MediaClient::RequestCaptureState(). (Closed)
Patch Set: rebase Created 3 years, 11 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
« no previous file with comments | « chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.h ('k') | no next file » | 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/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 "ash/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ptr_util.h" 12 #include "base/memory/ptr_util.h"
13 #include "build/build_config.h" 13 #include "build/build_config.h"
14 #include "chrome/browser/chrome_browser_main.h" 14 #include "chrome/browser/chrome_browser_main.h"
15 #include "chrome/browser/ui/ash/ash_init.h" 15 #include "chrome/browser/ui/ash/ash_init.h"
16 #include "chrome/browser/ui/ash/ash_util.h" 16 #include "chrome/browser/ui/ash/ash_util.h"
17 #include "chrome/browser/ui/ash/cast_config_client_media_router.h" 17 #include "chrome/browser/ui/ash/cast_config_client_media_router.h"
18 #include "chrome/browser/ui/ash/chrome_new_window_client.h" 18 #include "chrome/browser/ui/ash/chrome_new_window_client.h"
19 #include "chrome/browser/ui/ash/chrome_shell_content_state.h"
19 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_mus.h" 20 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_mus.h"
20 #include "chrome/browser/ui/ash/media_client.h" 21 #include "chrome/browser/ui/ash/media_client.h"
21 #include "chrome/browser/ui/views/ash/tab_scrubber.h" 22 #include "chrome/browser/ui/views/ash/tab_scrubber.h"
22 #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h" 23 #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h"
23 #include "chrome/browser/ui/views/frame/immersive_context_mus.h" 24 #include "chrome/browser/ui/views/frame/immersive_context_mus.h"
24 #include "chrome/browser/ui/views/frame/immersive_handler_factory_mus.h" 25 #include "chrome/browser/ui/views/frame/immersive_handler_factory_mus.h"
25 #include "chrome/common/chrome_switches.h" 26 #include "chrome/common/chrome_switches.h"
26 #include "ui/aura/env.h" 27 #include "ui/aura/env.h"
27 #include "ui/keyboard/content/keyboard.h" 28 #include "ui/keyboard/content/keyboard.h"
28 #include "ui/keyboard/keyboard_controller.h" 29 #include "ui/keyboard/keyboard_controller.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 #endif // defined(OS_CHROMEOS) 75 #endif // defined(OS_CHROMEOS)
75 } 76 }
76 77
77 void ChromeBrowserMainExtraPartsAsh::PostProfileInit() { 78 void ChromeBrowserMainExtraPartsAsh::PostProfileInit() {
78 if (chrome::IsRunningInMash()) { 79 if (chrome::IsRunningInMash()) {
79 DCHECK(!ash::Shell::HasInstance()); 80 DCHECK(!ash::Shell::HasInstance());
80 DCHECK(!ChromeLauncherController::instance()); 81 DCHECK(!ChromeLauncherController::instance());
81 chrome_launcher_controller_mus_ = 82 chrome_launcher_controller_mus_ =
82 base::MakeUnique<ChromeLauncherControllerMus>(); 83 base::MakeUnique<ChromeLauncherControllerMus>();
83 chrome_launcher_controller_mus_->Init(); 84 chrome_launcher_controller_mus_->Init();
85 chrome_shell_content_state_ = base::MakeUnique<ChromeShellContentState>();
84 } 86 }
85 87
86 cast_config_client_media_router_ = 88 cast_config_client_media_router_ =
87 base::MakeUnique<CastConfigClientMediaRouter>(); 89 base::MakeUnique<CastConfigClientMediaRouter>();
88 media_client_ = base::MakeUnique<MediaClient>(); 90 media_client_ = base::MakeUnique<MediaClient>();
89 91
90 if (!ash::Shell::HasInstance()) 92 if (!ash::Shell::HasInstance())
91 return; 93 return;
92 94
93 // Initialize TabScrubber after the Ash Shell has been initialized. 95 // Initialize TabScrubber after the Ash Shell has been initialized.
94 TabScrubber::GetInstance(); 96 TabScrubber::GetInstance();
95 // Activate virtual keyboard after profile is initialized. It depends on the 97 // Activate virtual keyboard after profile is initialized. It depends on the
96 // default profile. 98 // default profile.
97 ash::Shell::GetPrimaryRootWindowController()->ActivateKeyboard( 99 ash::Shell::GetPrimaryRootWindowController()->ActivateKeyboard(
98 keyboard::KeyboardController::GetInstance()); 100 keyboard::KeyboardController::GetInstance());
99 } 101 }
100 102
101 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() { 103 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() {
102 #if defined(OS_CHROMEOS) 104 #if defined(OS_CHROMEOS)
103 vpn_list_forwarder_.reset(); 105 vpn_list_forwarder_.reset();
104 volume_controller_.reset(); 106 volume_controller_.reset();
105 new_window_client_.reset(); 107 new_window_client_.reset();
106 system_tray_client_.reset(); 108 system_tray_client_.reset();
107 media_client_.reset(); 109 media_client_.reset();
108 cast_config_client_media_router_.reset(); 110 cast_config_client_media_router_.reset();
109 session_controller_client_.reset(); 111 session_controller_client_.reset();
110 #endif 112 #endif
111 chrome::CloseAsh(); 113 chrome::CloseAsh();
112 } 114 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698