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

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

Issue 1834203003: Revert of Refine ash shelf tooltip closing on non-mash ChromeOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_tooltip_manager_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/shelf/shelf_widget.h" 5 #include "ash/shelf/shelf_widget.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/focus_cycler.h" 8 #include "ash/focus_cycler.h"
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/session/session_state_delegate.h" 10 #include "ash/session/session_state_delegate.h"
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 case ash::SHELF_ALIGNMENT_RIGHT: 273 case ash::SHELF_ALIGNMENT_RIGHT:
274 return gfx::Insets(0, distance, 0, 0); 274 return gfx::Insets(0, distance, 0, 0);
275 case ash::SHELF_ALIGNMENT_TOP: 275 case ash::SHELF_ALIGNMENT_TOP:
276 return gfx::Insets(0, 0, distance, 0); 276 return gfx::Insets(0, 0, distance, 0);
277 } 277 }
278 NOTREACHED(); 278 NOTREACHED();
279 return gfx::Insets(); 279 return gfx::Insets();
280 } 280 }
281 281
282 // ash::ShelfLayoutManagerObserver: 282 // ash::ShelfLayoutManagerObserver:
283 void WillDeleteShelf() override { 283 void WillDeleteShelf() override { shelf_ = NULL; }
284 shelf_->RemoveObserver(this);
285 shelf_ = NULL;
286 }
287 284
288 void WillChangeVisibilityState(ash::ShelfVisibilityState new_state) override { 285 void WillChangeVisibilityState(ash::ShelfVisibilityState new_state) override {
289 gfx::Insets mouse_insets; 286 gfx::Insets mouse_insets;
290 gfx::Insets touch_insets; 287 gfx::Insets touch_insets;
291 if (new_state == ash::SHELF_VISIBLE) { 288 if (new_state == ash::SHELF_VISIBLE) {
292 // Let clicks at the very top of the shelf through so windows can be 289 // Let clicks at the very top of the shelf through so windows can be
293 // resized with the bottom-right corner and bottom edge. 290 // resized with the bottom-right corner and bottom edge.
294 mouse_insets = GetInsetsForAlignment( 291 mouse_insets = GetInsetsForAlignment(
295 ShelfLayoutManager::kWorkspaceAreaVisibleInset, 292 ShelfLayoutManager::kWorkspaceAreaVisibleInset,
296 shelf_->GetAlignment()); 293 shelf_->GetAlignment());
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 DCHECK(delegate_view_); 832 DCHECK(delegate_view_);
836 return delegate_view_->disable_dimming_animations_for_test(); 833 return delegate_view_->disable_dimming_animations_for_test();
837 } 834 }
838 835
839 void ShelfWidget::WillDeleteShelf() { 836 void ShelfWidget::WillDeleteShelf() {
840 shelf_layout_manager_->RemoveObserver(this); 837 shelf_layout_manager_->RemoveObserver(this);
841 shelf_layout_manager_ = NULL; 838 shelf_layout_manager_ = NULL;
842 } 839 }
843 840
844 } // namespace ash 841 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_tooltip_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698