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

Side by Side Diff: ash/wm/panels/attached_panel_window_targeter.cc

Issue 2899253002: chromeos: Rename ash::WmShelf to Shelf (Closed)
Patch Set: rebase Created 3 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
« no previous file with comments | « ash/wm/overview/window_selector_unittest.cc ('k') | ash/wm/panels/panel_layout_manager.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/panels/attached_panel_window_targeter.h" 5 #include "ash/wm/panels/attached_panel_window_targeter.h"
6 6
7 #include "ash/shelf/wm_shelf.h" 7 #include "ash/shelf/shelf.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/wm/panels/panel_layout_manager.h" 9 #include "ash/wm/panels/panel_layout_manager.h"
10 #include "ash/wm_window.h" 10 #include "ash/wm_window.h"
11 #include "ui/aura/window.h" 11 #include "ui/aura/window.h"
12 12
13 namespace ash { 13 namespace ash {
14 14
15 AttachedPanelWindowTargeter::AttachedPanelWindowTargeter( 15 AttachedPanelWindowTargeter::AttachedPanelWindowTargeter(
16 aura::Window* container, 16 aura::Window* container,
17 const gfx::Insets& default_mouse_extend, 17 const gfx::Insets& default_mouse_extend,
(...skipping 27 matching lines...) Expand all
45 } 45 }
46 46
47 void AttachedPanelWindowTargeter::UpdateTouchExtend(aura::Window* root_window) { 47 void AttachedPanelWindowTargeter::UpdateTouchExtend(aura::Window* root_window) {
48 // Only update the touch insets for panels if they are attached to the shelf 48 // Only update the touch insets for panels if they are attached to the shelf
49 // in |root_window|. 49 // in |root_window|.
50 if (panel_container_->GetRootWindow() != root_window) 50 if (panel_container_->GetRootWindow() != root_window)
51 return; 51 return;
52 52
53 DCHECK(panel_layout_manager_->shelf()); 53 DCHECK(panel_layout_manager_->shelf());
54 gfx::Insets touch(default_touch_extend_); 54 gfx::Insets touch(default_touch_extend_);
55 switch (panel_layout_manager_->shelf()->GetAlignment()) { 55 switch (panel_layout_manager_->shelf()->alignment()) {
56 case SHELF_ALIGNMENT_BOTTOM: 56 case SHELF_ALIGNMENT_BOTTOM:
57 case SHELF_ALIGNMENT_BOTTOM_LOCKED: 57 case SHELF_ALIGNMENT_BOTTOM_LOCKED:
58 set_touch_extend( 58 set_touch_extend(
59 gfx::Insets(touch.top(), touch.left(), 0, touch.right())); 59 gfx::Insets(touch.top(), touch.left(), 0, touch.right()));
60 break; 60 break;
61 case SHELF_ALIGNMENT_LEFT: 61 case SHELF_ALIGNMENT_LEFT:
62 set_touch_extend( 62 set_touch_extend(
63 gfx::Insets(touch.top(), 0, touch.bottom(), touch.right())); 63 gfx::Insets(touch.top(), 0, touch.bottom(), touch.right()));
64 break; 64 break;
65 case SHELF_ALIGNMENT_RIGHT: 65 case SHELF_ALIGNMENT_RIGHT:
66 set_touch_extend( 66 set_touch_extend(
67 gfx::Insets(touch.top(), touch.left(), touch.bottom(), 0)); 67 gfx::Insets(touch.top(), touch.left(), touch.bottom(), 0));
68 break; 68 break;
69 } 69 }
70 } 70 }
71 71
72 } // namespace ash 72 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/overview/window_selector_unittest.cc ('k') | ash/wm/panels/panel_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698