| OLD | NEW | 
|     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 "ash/shell.h" |     5 #include "ash/shell.h" | 
|     6  |     6  | 
|     7 #include <algorithm> |     7 #include <algorithm> | 
|     8 #include <string> |     8 #include <string> | 
|     9 #include <utility> |     9 #include <utility> | 
|    10  |    10  | 
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   547 void Shell::NotifyShelfAutoHideBehaviorChanged(aura::Window* root_window) { |   547 void Shell::NotifyShelfAutoHideBehaviorChanged(aura::Window* root_window) { | 
|   548   for (auto& observer : shell_observers_) |   548   for (auto& observer : shell_observers_) | 
|   549     observer.OnShelfAutoHideBehaviorChanged(root_window); |   549     observer.OnShelfAutoHideBehaviorChanged(root_window); | 
|   550 } |   550 } | 
|   551  |   551  | 
|   552 // static |   552 // static | 
|   553 void Shell::SetIsBrowserProcessWithMash() { |   553 void Shell::SetIsBrowserProcessWithMash() { | 
|   554   g_is_browser_process_with_mash = true; |   554   g_is_browser_process_with_mash = true; | 
|   555 } |   555 } | 
|   556  |   556  | 
 |   557 void Shell::OnAppListVisibilityChanged(bool visible, | 
 |   558                                        aura::Window* root_window) { | 
 |   559   for (auto& observer : shell_observers_) | 
 |   560     observer.OnAppListVisibilityChanged(visible, root_window); | 
 |   561 } | 
 |   562  | 
|   557 //////////////////////////////////////////////////////////////////////////////// |   563 //////////////////////////////////////////////////////////////////////////////// | 
|   558 // Shell, private: |   564 // Shell, private: | 
|   559  |   565  | 
|   560 Shell::Shell(std::unique_ptr<ShellDelegate> shell_delegate, |   566 Shell::Shell(std::unique_ptr<ShellDelegate> shell_delegate, | 
|   561              std::unique_ptr<ShellPort> shell_port) |   567              std::unique_ptr<ShellPort> shell_port) | 
|   562     : shell_port_(std::move(shell_port)), |   568     : shell_port_(std::move(shell_port)), | 
|   563       ash_display_controller_(base::MakeUnique<AshDisplayController>()), |   569       ash_display_controller_(base::MakeUnique<AshDisplayController>()), | 
|   564       brightness_control_delegate_( |   570       brightness_control_delegate_( | 
|   565           base::MakeUnique<system::BrightnessControllerChromeos>()), |   571           base::MakeUnique<system::BrightnessControllerChromeos>()), | 
|   566       cast_config_(base::MakeUnique<CastConfigController>()), |   572       cast_config_(base::MakeUnique<CastConfigController>()), | 
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   912             ? kChromeOsBootColor |   918             ? kChromeOsBootColor | 
|   913             : 0); |   919             : 0); | 
|   914     display_initialized = true; |   920     display_initialized = true; | 
|   915   } |   921   } | 
|   916   display_color_manager_.reset(new DisplayColorManager( |   922   display_color_manager_.reset(new DisplayColorManager( | 
|   917       display_configurator_.get(), init_params.blocking_pool)); |   923       display_configurator_.get(), init_params.blocking_pool)); | 
|   918  |   924  | 
|   919   if (!display_initialized) |   925   if (!display_initialized) | 
|   920     display_manager_->InitDefaultDisplay(); |   926     display_manager_->InitDefaultDisplay(); | 
|   921  |   927  | 
|   922   // TODO(sky): move this to chrome for mash. http://crbug.com/729824. |   928   if (config == Config::CLASSIC) { | 
|   923   if (ShouldEnableSimplifiedDisplayManagement()) |  | 
|   924     display_manager_->RefreshFontParams(); |   929     display_manager_->RefreshFontParams(); | 
|   925  |   930  | 
|   926   if (config == Config::CLASSIC) { |  | 
|   927     aura::Env::GetInstance()->set_context_factory(init_params.context_factory); |   931     aura::Env::GetInstance()->set_context_factory(init_params.context_factory); | 
|   928     aura::Env::GetInstance()->set_context_factory_private( |   932     aura::Env::GetInstance()->set_context_factory_private( | 
|   929         init_params.context_factory_private); |   933         init_params.context_factory_private); | 
|   930   } |   934   } | 
|   931  |   935  | 
|   932   // The WindowModalityController needs to be at the front of the input event |   936   // The WindowModalityController needs to be at the front of the input event | 
|   933   // pretarget handler list to ensure that it processes input events when modal |   937   // pretarget handler list to ensure that it processes input events when modal | 
|   934   // windows are active. |   938   // windows are active. | 
|   935   window_modality_controller_.reset(new ::wm::WindowModalityController(this)); |   939   window_modality_controller_.reset(new ::wm::WindowModalityController(this)); | 
|   936  |   940  | 
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1280 void Shell::OnPrefServiceInitialized( |  1284 void Shell::OnPrefServiceInitialized( | 
|  1281     std::unique_ptr<::PrefService> pref_service) { |  1285     std::unique_ptr<::PrefService> pref_service) { | 
|  1282   if (!instance_) |  1286   if (!instance_) | 
|  1283     return; |  1287     return; | 
|  1284   // |pref_service_| is null if can't connect to Chrome (as happens when |  1288   // |pref_service_| is null if can't connect to Chrome (as happens when | 
|  1285   // running mash outside of chrome --mash and chrome isn't built). |  1289   // running mash outside of chrome --mash and chrome isn't built). | 
|  1286   pref_service_ = std::move(pref_service); |  1290   pref_service_ = std::move(pref_service); | 
|  1287 } |  1291 } | 
|  1288  |  1292  | 
|  1289 }  // namespace ash |  1293 }  // namespace ash | 
| OLD | NEW |