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

Side by Side Diff: ash/display/display_controller.cc

Issue 331643004: Update the window labels if they change in overview mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Sky's comments Created 6 years, 6 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
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/display/display_controller.h" 5 #include "ash/display/display_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <map> 9 #include <map>
10 10
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 const AshWindowTreeHostInitParams& init_params) { 724 const AshWindowTreeHostInitParams& init_params) {
725 static int host_count = 0; 725 static int host_count = 0;
726 const DisplayInfo& display_info = 726 const DisplayInfo& display_info =
727 GetDisplayManager()->GetDisplayInfo(display.id()); 727 GetDisplayManager()->GetDisplayInfo(display.id());
728 AshWindowTreeHostInitParams params_with_bounds(init_params); 728 AshWindowTreeHostInitParams params_with_bounds(init_params);
729 params_with_bounds.initial_bounds = display_info.bounds_in_native(); 729 params_with_bounds.initial_bounds = display_info.bounds_in_native();
730 AshWindowTreeHost* ash_host = AshWindowTreeHost::Create(params_with_bounds); 730 AshWindowTreeHost* ash_host = AshWindowTreeHost::Create(params_with_bounds);
731 aura::WindowTreeHost* host = ash_host->AsWindowTreeHost(); 731 aura::WindowTreeHost* host = ash_host->AsWindowTreeHost();
732 732
733 host->window()->SetName(base::StringPrintf("RootWindow-%d", host_count++)); 733 host->window()->SetName(base::StringPrintf("RootWindow-%d", host_count++));
734 host->window()->set_title(base::UTF8ToUTF16(display_info.name())); 734 host->window()->SetTitle(base::UTF8ToUTF16(display_info.name()));
735 host->compositor()->SetBackgroundColor(SK_ColorBLACK); 735 host->compositor()->SetBackgroundColor(SK_ColorBLACK);
736 // No need to remove our observer observer because the DisplayController 736 // No need to remove our observer observer because the DisplayController
737 // outlives the host. 737 // outlives the host.
738 host->AddObserver(this); 738 host->AddObserver(this);
739 InitRootWindowSettings(host->window())->display_id = display.id(); 739 InitRootWindowSettings(host->window())->display_id = display.id();
740 host->InitHost(); 740 host->InitHost();
741 741
742 window_tree_hosts_[display.id()] = ash_host; 742 window_tree_hosts_[display.id()] = ash_host;
743 SetDisplayPropertiesOnHost(ash_host, display); 743 SetDisplayPropertiesOnHost(ash_host, display);
744 744
(...skipping 30 matching lines...) Expand all
775 std::string name = 775 std::string name =
776 root_windows[i] == primary ? "aura_root_0" : "aura_root_x"; 776 root_windows[i] == primary ? "aura_root_0" : "aura_root_x";
777 gfx::AcceleratedWidget xwindow = 777 gfx::AcceleratedWidget xwindow =
778 root_windows[i]->GetHost()->GetAcceleratedWidget(); 778 root_windows[i]->GetHost()->GetAcceleratedWidget();
779 XStoreName(gfx::GetXDisplay(), xwindow, name.c_str()); 779 XStoreName(gfx::GetXDisplay(), xwindow, name.c_str());
780 } 780 }
781 #endif 781 #endif
782 } 782 }
783 783
784 } // namespace ash 784 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/wm/overview/window_selector_item.h » ('j') | ash/wm/overview/window_selector_item.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698