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

Side by Side Diff: ash/wm/panel_layout_manager.cc

Issue 10442017: Rename GetRootWindow() -> GetPrimaryRootWindow() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git-try -b linux_chromeos,win_aura Created 8 years, 7 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 | « ash/wm/base_layout_manager_unittest.cc ('k') | ash/wm/partial_screenshot_view.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 "ash/wm/panel_layout_manager.h" 5 #include "ash/wm/panel_layout_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/launcher/launcher.h" 9 #include "ash/launcher/launcher.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; 84 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
85 params.parent = panel_container_; 85 params.parent = panel_container_;
86 params.bounds.set_width(kArrowWidth); 86 params.bounds.set_width(kArrowWidth);
87 params.bounds.set_height(kArrowHeight); 87 params.bounds.set_height(kArrowHeight);
88 // Why do we need this and can_activate = false? 88 // Why do we need this and can_activate = false?
89 callout_widget_->set_focus_on_creation(false); 89 callout_widget_->set_focus_on_creation(false);
90 callout_widget_->Init(params); 90 callout_widget_->Init(params);
91 views::View* content_view = new views::View; 91 views::View* content_view = new views::View;
92 content_view->set_background(new CalloutWidgetBackground); 92 content_view->set_background(new CalloutWidgetBackground);
93 callout_widget_->SetContentsView(content_view); 93 callout_widget_->SetContentsView(content_view);
94 Shell::GetRootWindow()->AddObserver(this); 94 Shell::GetPrimaryRootWindow()->AddObserver(this);
95 } 95 }
96 96
97 PanelLayoutManager::~PanelLayoutManager() { 97 PanelLayoutManager::~PanelLayoutManager() {
98 if (launcher_) 98 if (launcher_)
99 launcher_->RemoveIconObserver(this); 99 launcher_->RemoveIconObserver(this);
100 Shell::GetRootWindow()->RemoveObserver(this); 100 Shell::GetPrimaryRootWindow()->RemoveObserver(this);
101 } 101 }
102 102
103 void PanelLayoutManager::StartDragging(aura::Window* panel) { 103 void PanelLayoutManager::StartDragging(aura::Window* panel) {
104 DCHECK(!dragged_panel_); 104 DCHECK(!dragged_panel_);
105 DCHECK(panel->parent() == panel_container_); 105 DCHECK(panel->parent() == panel_container_);
106 dragged_panel_ = panel; 106 dragged_panel_ = panel;
107 } 107 }
108 108
109 void PanelLayoutManager::FinishDragging() { 109 void PanelLayoutManager::FinishDragging() {
110 DCHECK(dragged_panel_); 110 DCHECK(dragged_panel_);
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 callout_bounds.set_x( 353 callout_bounds.set_x(
354 bounds.x() + (bounds.width() - callout_bounds.width()) / 2); 354 bounds.x() + (bounds.width() - callout_bounds.width()) / 2);
355 callout_bounds.set_y(bounds.bottom()); 355 callout_bounds.set_y(bounds.bottom());
356 SetChildBoundsDirect(callout_widget_->GetNativeWindow(), callout_bounds); 356 SetChildBoundsDirect(callout_widget_->GetNativeWindow(), callout_bounds);
357 panel_container_->StackChildAtTop(callout_widget_->GetNativeWindow()); 357 panel_container_->StackChildAtTop(callout_widget_->GetNativeWindow());
358 callout_widget_->Show(); 358 callout_widget_->Show();
359 } 359 }
360 360
361 } // namespace internal 361 } // namespace internal
362 } // namespace ash 362 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/base_layout_manager_unittest.cc ('k') | ash/wm/partial_screenshot_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698