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

Unified Diff: ash/wm/shelf_layout_manager.cc

Issue 10221028: Move DIP translation from ui/aura to ui/compositor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert change i made by accident Created 8 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 side-by-side diff with in-line comments
Download patch
Index: ash/wm/shelf_layout_manager.cc
diff --git a/ash/wm/shelf_layout_manager.cc b/ash/wm/shelf_layout_manager.cc
index af5aa75c7b964a2c4d33bbcdde3f3ba449162371..bd7f82de5284e59ab60aa4c08a5ffeff64ee5b3e 100644
--- a/ash/wm/shelf_layout_manager.cc
+++ b/ash/wm/shelf_layout_manager.cc
@@ -14,7 +14,6 @@
#include "base/auto_reset.h"
#include "base/i18n/rtl.h"
#include "ui/aura/client/activation_client.h"
-#include "ui/aura/dip_util.h"
#include "ui/aura/event.h"
#include "ui/aura/event_filter.h"
#include "ui/aura/root_window.h"
@@ -37,11 +36,6 @@ ui::Layer* GetLayer(views::Widget* widget) {
return widget->GetNativeView()->layer();
}
-void SetLayerBounds(views::Widget* widget, const gfx::Rect& bounds) {
- aura::Window* window = widget->GetNativeView();
- window->layer()->SetBounds(aura::ConvertRectToPixel(window, bounds));
-}
-
} // namespace
// static
@@ -195,6 +189,7 @@ void ShelfLayoutManager::LayoutShelf() {
CalculateTargetBounds(state_, &target_bounds);
if (launcher_widget()) {
GetLayer(launcher_widget())->SetOpacity(target_bounds.opacity);
+
launcher_widget()->SetBounds(target_bounds.launcher_bounds);
launcher_->SetStatusWidth(
target_bounds.status_bounds.width());
@@ -334,7 +329,7 @@ void ShelfLayoutManager::SetState(VisibilityState visibility_state) {
launcher_animation_setter.SetTransitionDuration(
base::TimeDelta::FromMilliseconds(130));
launcher_animation_setter.SetTweenType(ui::Tween::EASE_OUT);
- SetLayerBounds(launcher_widget(), target_bounds.launcher_bounds);
+ GetLayer(launcher_widget())->SetBounds(target_bounds.launcher_bounds);
GetLayer(launcher_widget())->SetOpacity(target_bounds.opacity);
}
ui::ScopedLayerAnimationSettings status_animation_setter(
@@ -342,7 +337,7 @@ void ShelfLayoutManager::SetState(VisibilityState visibility_state) {
status_animation_setter.SetTransitionDuration(
base::TimeDelta::FromMilliseconds(130));
status_animation_setter.SetTweenType(ui::Tween::EASE_OUT);
- SetLayerBounds(status_, target_bounds.status_bounds);
+ GetLayer(status_)->SetBounds(target_bounds.status_bounds);
GetLayer(status_)->SetOpacity(target_bounds.opacity);
Shell::GetInstance()->SetMonitorWorkAreaInsets(
Shell::GetRootWindow(),

Powered by Google App Engine
This is Rietveld 408576698