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

Side by Side Diff: ash/common/wm/workspace/multi_window_resize_controller.cc

Issue 2726823003: Remove WmLookup. (Closed)
Patch Set: Clean up include and modify comment. Created 3 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/common/wm/workspace/multi_window_resize_controller.h" 5 #include "ash/common/wm/workspace/multi_window_resize_controller.h"
6 6
7 #include "ash/common/wm/workspace/workspace_window_resizer.h" 7 #include "ash/common/wm/workspace/workspace_window_resizer.h"
8 #include "ash/common/wm_lookup.h"
9 #include "ash/common/wm_window.h" 8 #include "ash/common/wm_window.h"
10 #include "ash/public/cpp/shell_window_ids.h" 9 #include "ash/public/cpp/shell_window_ids.h"
11 #include "ash/resources/grit/ash_resources.h" 10 #include "ash/resources/grit/ash_resources.h"
12 #include "ash/root_window_controller.h" 11 #include "ash/root_window_controller.h"
13 #include "ui/base/cursor/cursor.h" 12 #include "ui/base/cursor/cursor.h"
14 #include "ui/base/hit_test.h" 13 #include "ui/base/hit_test.h"
15 #include "ui/base/resource/resource_bundle.h" 14 #include "ui/base/resource/resource_bundle.h"
16 #include "ui/display/screen.h" 15 #include "ui/display/screen.h"
17 #include "ui/gfx/canvas.h" 16 #include "ui/gfx/canvas.h"
18 #include "ui/gfx/image/image.h" 17 #include "ui/gfx/image/image.h"
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP); 376 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP);
378 params.name = "MultiWindowResizeController"; 377 params.name = "MultiWindowResizeController";
379 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; 378 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
380 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; 379 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
381 windows_.window1->GetRootWindowController() 380 windows_.window1->GetRootWindowController()
382 ->ConfigureWidgetInitParamsForContainer( 381 ->ConfigureWidgetInitParamsForContainer(
383 resize_widget_.get(), kShellWindowId_AlwaysOnTopContainer, &params); 382 resize_widget_.get(), kShellWindowId_AlwaysOnTopContainer, &params);
384 ResizeView* view = new ResizeView(this, windows_.direction); 383 ResizeView* view = new ResizeView(this, windows_.direction);
385 resize_widget_->set_focus_on_creation(false); 384 resize_widget_->set_focus_on_creation(false);
386 resize_widget_->Init(params); 385 resize_widget_->Init(params);
387 WmLookup::Get() 386 WmWindow::Get(resize_widget_->GetNativeWindow())
388 ->GetWindowForWidget(resize_widget_.get())
389 ->SetVisibilityAnimationType(::wm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); 387 ->SetVisibilityAnimationType(::wm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE);
390 resize_widget_->SetContentsView(view); 388 resize_widget_->SetContentsView(view);
391 show_bounds_in_screen_ = windows_.window1->GetParent()->ConvertRectToScreen( 389 show_bounds_in_screen_ = windows_.window1->GetParent()->ConvertRectToScreen(
392 CalculateResizeWidgetBounds(show_location_in_parent_)); 390 CalculateResizeWidgetBounds(show_location_in_parent_));
393 resize_widget_->SetBounds(show_bounds_in_screen_); 391 resize_widget_->SetBounds(show_bounds_in_screen_);
394 resize_widget_->Show(); 392 resize_widget_->Show();
395 CreateMouseWatcher(); 393 CreateMouseWatcher();
396 } 394 }
397 395
398 bool MultiWindowResizeController::IsShowing() const { 396 bool MultiWindowResizeController::IsShowing() const {
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 531
534 bool MultiWindowResizeController::IsOverComponent( 532 bool MultiWindowResizeController::IsOverComponent(
535 WmWindow* window, 533 WmWindow* window,
536 const gfx::Point& location_in_screen, 534 const gfx::Point& location_in_screen,
537 int component) const { 535 int component) const {
538 gfx::Point window_loc = window->ConvertPointFromScreen(location_in_screen); 536 gfx::Point window_loc = window->ConvertPointFromScreen(location_in_screen);
539 return window->GetNonClientComponent(window_loc) == component; 537 return window->GetNonClientComponent(window_loc) == component;
540 } 538 }
541 539
542 } // namespace ash 540 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm/window_positioning_utils.cc ('k') | ash/common/wm/workspace/phantom_window_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698