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

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: disable tests that doesn't run on bots 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
« no previous file with comments | « ash/wm/shadow_controller.cc ('k') | ash/wm/window_animations.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/shelf_layout_manager.cc
diff --git a/ash/wm/shelf_layout_manager.cc b/ash/wm/shelf_layout_manager.cc
index 188449a775e752ae0e01c695189bbf8f2a5b1b16..0d344fee09db2c0a0dd73391898e79add1b0f86c 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(),
« no previous file with comments | « ash/wm/shadow_controller.cc ('k') | ash/wm/window_animations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698