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

Side by Side Diff: ui/aura/root_window.cc

Issue 9289036: aura: Add Layer::LAYER_SOLID_COLOR to compositor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update WorkspaceManagerTest Created 8 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « ui/aura/event_filter_unittest.cc ('k') | ui/aura/test/test_windows.cc » ('j') | 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 "ui/aura/root_window.h" 5 #include "ui/aura/root_window.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 646
647 Window* RootWindow::GetFocusedWindow() { 647 Window* RootWindow::GetFocusedWindow() {
648 return focused_window_; 648 return focused_window_;
649 } 649 }
650 650
651 bool RootWindow::IsFocusedWindow(const Window* window) const { 651 bool RootWindow::IsFocusedWindow(const Window* window) const {
652 return focused_window_ == window; 652 return focused_window_ == window;
653 } 653 }
654 654
655 void RootWindow::Init() { 655 void RootWindow::Init() {
656 Window::Init(ui::Layer::LAYER_HAS_NO_TEXTURE); 656 Window::Init(ui::Layer::LAYER_NOT_DRAWN);
657 SetBounds(gfx::Rect(host_->GetSize())); 657 SetBounds(gfx::Rect(host_->GetSize()));
658 Show(); 658 Show();
659 compositor()->SetRootLayer(layer()); 659 compositor()->SetRootLayer(layer());
660 host_->SetRootWindow(this); 660 host_->SetRootWindow(this);
661 } 661 }
662 662
663 gfx::Rect RootWindow::GetInitialHostWindowBounds() const { 663 gfx::Rect RootWindow::GetInitialHostWindowBounds() const {
664 gfx::Rect bounds(kDefaultHostWindowX, kDefaultHostWindowY, 664 gfx::Rect bounds(kDefaultHostWindowX, kDefaultHostWindowY,
665 kDefaultHostWindowWidth, kDefaultHostWindowHeight); 665 kDefaultHostWindowWidth, kDefaultHostWindowHeight);
666 666
667 const string size_str = CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 667 const string size_str = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
668 switches::kAuraHostWindowSize); 668 switches::kAuraHostWindowSize);
669 vector<string> parts; 669 vector<string> parts;
670 base::SplitString(size_str, 'x', &parts); 670 base::SplitString(size_str, 'x', &parts);
671 int parsed_width = 0, parsed_height = 0; 671 int parsed_width = 0, parsed_height = 0;
672 if (parts.size() == 2 && 672 if (parts.size() == 2 &&
673 base::StringToInt(parts[0], &parsed_width) && parsed_width > 0 && 673 base::StringToInt(parts[0], &parsed_width) && parsed_width > 0 &&
674 base::StringToInt(parts[1], &parsed_height) && parsed_height > 0) { 674 base::StringToInt(parts[1], &parsed_height) && parsed_height > 0) {
675 bounds.set_size(gfx::Size(parsed_width, parsed_height)); 675 bounds.set_size(gfx::Size(parsed_width, parsed_height));
676 } else if (use_fullscreen_host_window_) { 676 } else if (use_fullscreen_host_window_) {
677 bounds = gfx::Rect(RootWindowHost::GetNativeScreenSize()); 677 bounds = gfx::Rect(RootWindowHost::GetNativeScreenSize());
678 } 678 }
679 679
680 return bounds; 680 return bounds;
681 } 681 }
682 682
683 } // namespace aura 683 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/event_filter_unittest.cc ('k') | ui/aura/test/test_windows.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698