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

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

Issue 10827145: Convert Aura to use ui::Event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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/overlay_event_filter.cc ('k') | ash/wm/panel_window_event_filter.h » ('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 #include <map> 8 #include <map>
9 9
10 #include "ash/launcher/launcher.h" 10 #include "ash/launcher/launcher.h"
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 // TODO(dcheng): Need to anchor to overflow icon. 267 // TODO(dcheng): Need to anchor to overflow icon.
268 if (icon_bounds.IsEmpty()) 268 if (icon_bounds.IsEmpty())
269 continue; 269 continue;
270 270
271 if (panel->HasFocus()) { 271 if (panel->HasFocus()) {
272 DCHECK(!active_panel); 272 DCHECK(!active_panel);
273 active_panel = panel; 273 active_panel = panel;
274 } 274 }
275 275
276 gfx::Point icon_origin = icon_bounds.origin(); 276 gfx::Point icon_origin = icon_bounds.origin();
277 aura::Window::ConvertPointToWindow(panel_container_->GetRootWindow(), 277 aura::Window::ConvertPointToTarget(panel_container_->GetRootWindow(),
278 panel_container_, &icon_origin); 278 panel_container_, &icon_origin);
279 279
280 // TODO(dcheng): Need to clamp to screen edges. 280 // TODO(dcheng): Need to clamp to screen edges.
281 gfx::Rect bounds = panel->bounds(); 281 gfx::Rect bounds = panel->bounds();
282 bounds.set_x( 282 bounds.set_x(
283 icon_origin.x() + icon_bounds.width() / 2 - bounds.width() / 2); 283 icon_origin.x() + icon_bounds.width() / 2 - bounds.width() / 2);
284 bounds.set_y(launcher_top - bounds.height()); 284 bounds.set_y(launcher_top - bounds.height());
285 SetChildBoundsDirect(panel, bounds); 285 SetChildBoundsDirect(panel, bounds);
286 } 286 }
287 287
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 callout_bounds.set_x( 358 callout_bounds.set_x(
359 bounds.x() + (bounds.width() - callout_bounds.width()) / 2); 359 bounds.x() + (bounds.width() - callout_bounds.width()) / 2);
360 callout_bounds.set_y(bounds.bottom()); 360 callout_bounds.set_y(bounds.bottom());
361 SetChildBoundsDirect(callout_widget_->GetNativeWindow(), callout_bounds); 361 SetChildBoundsDirect(callout_widget_->GetNativeWindow(), callout_bounds);
362 panel_container_->StackChildAtTop(callout_widget_->GetNativeWindow()); 362 panel_container_->StackChildAtTop(callout_widget_->GetNativeWindow());
363 callout_widget_->Show(); 363 callout_widget_->Show();
364 } 364 }
365 365
366 } // namespace internal 366 } // namespace internal
367 } // namespace ash 367 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/overlay_event_filter.cc ('k') | ash/wm/panel_window_event_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698