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

Side by Side Diff: ash/shelf/shelf_tooltip_manager.cc

Issue 1849623002: Remove unused ash::SHELF_ALIGNMENT_TOP (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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/shelf/shelf_layout_manager_unittest.cc ('k') | ash/shelf/shelf_types.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/shelf/shelf_tooltip_manager.h" 5 #include "ash/shelf/shelf_tooltip_manager.h"
6 6
7 #include "ash/shelf/shelf.h" 7 #include "ash/shelf/shelf.h"
8 #include "ash/shelf/shelf_layout_manager.h" 8 #include "ash/shelf/shelf_layout_manager.h"
9 #include "ash/shelf/shelf_view.h" 9 #include "ash/shelf/shelf_view.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 wm::SetWindowVisibilityAnimationTransition(native_view, wm::ANIMATE_NONE); 140 wm::SetWindowVisibilityAnimationTransition(native_view, wm::ANIMATE_NONE);
141 Close(); 141 Close();
142 } 142 }
143 143
144 if (shelf_layout_manager_ && !shelf_layout_manager_->IsVisible()) 144 if (shelf_layout_manager_ && !shelf_layout_manager_->IsVisible())
145 return; 145 return;
146 146
147 Shelf* shelf = shelf_view_->shelf(); 147 Shelf* shelf = shelf_view_->shelf();
148 views::BubbleBorder::Arrow arrow = shelf->SelectValueForShelfAlignment( 148 views::BubbleBorder::Arrow arrow = shelf->SelectValueForShelfAlignment(
149 views::BubbleBorder::BOTTOM_CENTER, views::BubbleBorder::LEFT_CENTER, 149 views::BubbleBorder::BOTTOM_CENTER, views::BubbleBorder::LEFT_CENTER,
150 views::BubbleBorder::RIGHT_CENTER, views::BubbleBorder::TOP_CENTER); 150 views::BubbleBorder::RIGHT_CENTER);
151 151
152 base::string16 text = shelf_view_->GetTitleForView(view); 152 base::string16 text = shelf_view_->GetTitleForView(view);
153 bubble_ = new ShelfTooltipBubble(view, arrow, text); 153 bubble_ = new ShelfTooltipBubble(view, arrow, text);
154 gfx::NativeView native_view = bubble_->GetWidget()->GetNativeView(); 154 gfx::NativeView native_view = bubble_->GetWidget()->GetNativeView();
155 wm::SetWindowVisibilityAnimationType( 155 wm::SetWindowVisibilityAnimationType(
156 native_view, wm::WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL); 156 native_view, wm::WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL);
157 wm::SetWindowVisibilityAnimationTransition(native_view, wm::ANIMATE_HIDE); 157 wm::SetWindowVisibilityAnimationTransition(native_view, wm::ANIMATE_HIDE);
158 bubble_->GetWidget()->Show(); 158 bubble_->GetWidget()->Show();
159 } 159 }
160 160
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 // AutoHide state change happens during an event filter, so immediate close 219 // AutoHide state change happens during an event filter, so immediate close
220 // may cause a crash in the HandleMouseEvent() after the filter. So we just 220 // may cause a crash in the HandleMouseEvent() after the filter. So we just
221 // schedule the Close here. 221 // schedule the Close here.
222 base::ThreadTaskRunnerHandle::Get()->PostTask( 222 base::ThreadTaskRunnerHandle::Get()->PostTask(
223 FROM_HERE, 223 FROM_HERE,
224 base::Bind(&ShelfTooltipManager::Close, weak_factory_.GetWeakPtr())); 224 base::Bind(&ShelfTooltipManager::Close, weak_factory_.GetWeakPtr()));
225 } 225 }
226 } 226 }
227 227
228 } // namespace ash 228 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | ash/shelf/shelf_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698