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

Side by Side Diff: ash/shell.cc

Issue 26373009: ash:Shelf - Added UMA stats for ShelfAlignment (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits & things Created 7 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/accelerator_controller.h" 10 #include "ash/accelerators/accelerator_controller.h"
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_); 555 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_);
556 if (!gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE)) 556 if (!gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE))
557 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_); 557 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_);
558 display_controller_.reset(new DisplayController); 558 display_controller_.reset(new DisplayController);
559 #if defined(OS_CHROMEOS) && defined(USE_X11) 559 #if defined(OS_CHROMEOS) && defined(USE_X11)
560 bool is_panel_fitting_disabled = 560 bool is_panel_fitting_disabled =
561 content::GpuDataManager::GetInstance()->IsFeatureBlacklisted( 561 content::GpuDataManager::GetInstance()->IsFeatureBlacklisted(
562 gpu::GPU_FEATURE_TYPE_PANEL_FITTING); 562 gpu::GPU_FEATURE_TYPE_PANEL_FITTING);
563 563
564 output_configurator_->Init(!is_panel_fitting_disabled); 564 output_configurator_->Init(!is_panel_fitting_disabled);
565 periodic_metrics_recorder_.reset(new AshPeriodicMetricsRecorder);
565 566
566 base::MessagePumpX11::Current()->AddDispatcherForRootWindow( 567 base::MessagePumpX11::Current()->AddDispatcherForRootWindow(
567 output_configurator()); 568 output_configurator());
568 // We can't do this with a root window listener because XI_HierarchyChanged 569 // We can't do this with a root window listener because XI_HierarchyChanged
569 // messages don't have a target window. 570 // messages don't have a target window.
570 base::MessagePumpX11::Current()->AddObserver(output_configurator()); 571 base::MessagePumpX11::Current()->AddObserver(output_configurator());
571 #endif // defined(OS_CHROMEOS) 572 #endif // defined(OS_CHROMEOS)
572 573
573 #if defined(OS_CHROMEOS) 574 #if defined(OS_CHROMEOS)
574 internal::PowerStatus::Initialize(); 575 internal::PowerStatus::Initialize();
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 //////////////////////////////////////////////////////////////////////////////// 985 ////////////////////////////////////////////////////////////////////////////////
985 // Shell, aura::client::ActivationChangeObserver implementation: 986 // Shell, aura::client::ActivationChangeObserver implementation:
986 987
987 void Shell::OnWindowActivated(aura::Window* gained_active, 988 void Shell::OnWindowActivated(aura::Window* gained_active,
988 aura::Window* lost_active) { 989 aura::Window* lost_active) {
989 if (gained_active) 990 if (gained_active)
990 target_root_window_ = gained_active->GetRootWindow(); 991 target_root_window_ = gained_active->GetRootWindow();
991 } 992 }
992 993
993 } // namespace ash 994 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698