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

Side by Side Diff: ash/wm/overview/window_grid.cc

Issue 347813002: Added ignored_by_shelf bit to overview mode selection widget. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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 | « no previous file | 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 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/overview/window_grid.h" 5 #include "ash/wm/overview/window_grid.h"
6 6
7 #include "ash/screen_util.h" 7 #include "ash/screen_util.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/shell_window_ids.h" 9 #include "ash/shell_window_ids.h"
10 #include "ash/wm/overview/scoped_transform_overview_window.h" 10 #include "ash/wm/overview/scoped_transform_overview_window.h"
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; 351 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
352 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; 352 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
353 params.parent = Shell::GetContainer(root_window_, 353 params.parent = Shell::GetContainer(root_window_,
354 kShellWindowId_DefaultContainer); 354 kShellWindowId_DefaultContainer);
355 params.accept_events = false; 355 params.accept_events = false;
356 selection_widget_->set_focus_on_creation(false); 356 selection_widget_->set_focus_on_creation(false);
357 selection_widget_->Init(params); 357 selection_widget_->Init(params);
358 // Disable the "bounce in" animation when showing the window. 358 // Disable the "bounce in" animation when showing the window.
359 ::wm::SetWindowVisibilityAnimationTransition( 359 ::wm::SetWindowVisibilityAnimationTransition(
360 selection_widget_->GetNativeWindow(), ::wm::ANIMATE_NONE); 360 selection_widget_->GetNativeWindow(), ::wm::ANIMATE_NONE);
361 // The selection widget should not activate the shelf when passing under it.
362 ash::wm::GetWindowState(selection_widget_->GetNativeWindow())->
363 set_ignored_by_shelf(true);
364
361 views::View* content_view = new views::View; 365 views::View* content_view = new views::View;
362 content_view->set_background( 366 content_view->set_background(
363 views::Background::CreateSolidBackground(kWindowOverviewSelectionColor)); 367 views::Background::CreateSolidBackground(kWindowOverviewSelectionColor));
364 selection_widget_->SetContentsView(content_view); 368 selection_widget_->SetContentsView(content_view);
365 selection_widget_->GetNativeWindow()->parent()->StackChildAtBottom( 369 selection_widget_->GetNativeWindow()->parent()->StackChildAtBottom(
366 selection_widget_->GetNativeWindow()); 370 selection_widget_->GetNativeWindow());
367 selection_widget_->Show(); 371 selection_widget_->Show();
368 // New selection widget starts with 0 opacity and then fades in. 372 // New selection widget starts with 0 opacity and then fades in.
369 selection_widget_->GetNativeWindow()->layer()->SetOpacity(0); 373 selection_widget_->GetNativeWindow()->layer()->SetOpacity(0);
370 374
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); 434 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
431 selection_widget_->SetBounds(SelectedWindow()->target_bounds()); 435 selection_widget_->SetBounds(SelectedWindow()->target_bounds());
432 selection_widget_->SetOpacity(kWindowOverviewSelectorOpacity); 436 selection_widget_->SetOpacity(kWindowOverviewSelectorOpacity);
433 return; 437 return;
434 } 438 }
435 selection_widget_->SetBounds(SelectedWindow()->target_bounds()); 439 selection_widget_->SetBounds(SelectedWindow()->target_bounds());
436 selection_widget_->SetOpacity(kWindowOverviewSelectorOpacity); 440 selection_widget_->SetOpacity(kWindowOverviewSelectorOpacity);
437 } 441 }
438 442
439 } // namespace ash 443 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698