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

Side by Side Diff: ash/shell.cc

Issue 11361274: Add NetworkStateListDetailedView (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 "ash/shell.h" 5 #include "ash/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "ash/accelerators/focus_manager_factory.h" 10 #include "ash/accelerators/focus_manager_factory.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 #include "ash/accelerators/accelerator_filter.h" 94 #include "ash/accelerators/accelerator_filter.h"
95 #include "ash/accelerators/nested_dispatcher_controller.h" 95 #include "ash/accelerators/nested_dispatcher_controller.h"
96 #endif 96 #endif
97 97
98 #if defined(OS_CHROMEOS) 98 #if defined(OS_CHROMEOS)
99 #include "ash/display/display_change_observer_x11.h" 99 #include "ash/display/display_change_observer_x11.h"
100 #include "ash/display/output_configurator_animation.h" 100 #include "ash/display/output_configurator_animation.h"
101 #include "base/chromeos/chromeos_version.h" 101 #include "base/chromeos/chromeos_version.h"
102 #include "base/message_pump_aurax11.h" 102 #include "base/message_pump_aurax11.h"
103 #include "chromeos/display/output_configurator.h" 103 #include "chromeos/display/output_configurator.h"
104 #include "chromeos/network/network_state_handler.h"
104 #include "content/public/browser/gpu_data_manager.h" 105 #include "content/public/browser/gpu_data_manager.h"
105 #include "content/public/common/gpu_feature_type.h" 106 #include "content/public/common/gpu_feature_type.h"
106 #endif // defined(OS_CHROMEOS) 107 #endif // defined(OS_CHROMEOS)
107 108
108 namespace ash { 109 namespace ash {
109 110
110 namespace { 111 namespace {
111 112
112 using aura::Window; 113 using aura::Window;
113 using views::Widget; 114 using views::Widget;
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 content::GpuDataManager::GetInstance()->GetBlacklistedFeatures(); 215 content::GpuDataManager::GetInstance()->GetBlacklistedFeatures();
215 bool is_panel_fitting_disabled = 216 bool is_panel_fitting_disabled =
216 (blacklisted_features & content::GPU_FEATURE_TYPE_PANEL_FITTING) || 217 (blacklisted_features & content::GPU_FEATURE_TYPE_PANEL_FITTING) ||
217 CommandLine::ForCurrentProcess()->HasSwitch( 218 CommandLine::ForCurrentProcess()->HasSwitch(
218 switches::kAshDisablePanelFitting); 219 switches::kAshDisablePanelFitting);
219 output_configurator_->Init(!is_panel_fitting_disabled); 220 output_configurator_->Init(!is_panel_fitting_disabled);
220 221
221 output_configurator_->AddObserver(output_configurator_animation_.get()); 222 output_configurator_->AddObserver(output_configurator_animation_.get());
222 base::MessagePumpAuraX11::Current()->AddDispatcherForRootWindow( 223 base::MessagePumpAuraX11::Current()->AddDispatcherForRootWindow(
223 output_configurator()); 224 output_configurator());
225 if (CommandLine::ForCurrentProcess()->HasSwitch(
226 switches::kAshEnableNetworkStateHandler)) {
227 network_state_handler_.reset(new chromeos::NetworkStateHandler());
228 network_state_handler_->Init();
229 }
224 #endif // defined(OS_CHROMEOS) 230 #endif // defined(OS_CHROMEOS)
225 } 231 }
226 232
227 Shell::~Shell() { 233 Shell::~Shell() {
228 views::FocusManagerFactory::Install(NULL); 234 views::FocusManagerFactory::Install(NULL);
229 235
230 // Remove the focus from any window. This will prevent overhead and side 236 // Remove the focus from any window. This will prevent overhead and side
231 // effects (e.g. crashes) from changing focus during shutdown. 237 // effects (e.g. crashes) from changing focus during shutdown.
232 // See bug crbug.com/134502. 238 // See bug crbug.com/134502.
233 if (active_root_window_) 239 if (active_root_window_)
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 855
850 bool Shell::CanAcceptEvents() { 856 bool Shell::CanAcceptEvents() {
851 return true; 857 return true;
852 } 858 }
853 859
854 ui::EventTarget* Shell::GetParentTarget() { 860 ui::EventTarget* Shell::GetParentTarget() {
855 return NULL; 861 return NULL;
856 } 862 }
857 863
858 } // namespace ash 864 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698