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

Unified Diff: ash/wm/workspace/workspace_layout_manager.cc

Issue 9565004: Revert 124385 - Allows tab dragging when maximized on aura. To fix it I made it so (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 10 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/workspace/workspace_layout_manager.h ('k') | ash/wm/workspace/workspace_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/workspace_layout_manager.cc
===================================================================
--- ash/wm/workspace/workspace_layout_manager.cc (revision 124386)
+++ ash/wm/workspace/workspace_layout_manager.cc (working copy)
@@ -8,7 +8,6 @@
#include "ash/wm/window_util.h"
#include "ash/wm/workspace/workspace.h"
#include "ash/wm/workspace/workspace_manager.h"
-#include "ash/wm/workspace/workspace_window_resizer.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/event.h"
#include "ui/aura/root_window.h"
@@ -30,19 +29,13 @@
: workspace_manager_(workspace_manager) {
}
-WorkspaceLayoutManager::~WorkspaceLayoutManager() {
- const aura::Window::Windows& windows(
- workspace_manager_->contents_view()->children());
- for (size_t i = 0; i < windows.size(); ++i)
- windows[i]->RemoveObserver(this);
-}
+WorkspaceLayoutManager::~WorkspaceLayoutManager() {}
void WorkspaceLayoutManager::OnWindowResized() {
// Workspace is updated via RootWindowObserver::OnRootWindowResized.
}
void WorkspaceLayoutManager::OnWindowAddedToLayout(aura::Window* child) {
- child->AddObserver(this);
if (!workspace_manager_->IsManagedWindow(child))
return;
@@ -63,7 +56,6 @@
void WorkspaceLayoutManager::OnWillRemoveWindowFromLayout(
aura::Window* child) {
- child->RemoveObserver(this);
ClearRestoreBounds(child);
workspace_manager_->RemoveWindow(child);
}
@@ -83,29 +75,16 @@
aura::Window* child,
const gfx::Rect& requested_bounds) {
gfx::Rect child_bounds(requested_bounds);
- if (GetTrackedByWorkspace(child)) {
- if (wm::IsWindowMaximized(child)) {
- child_bounds = gfx::Screen::GetMonitorWorkAreaNearestWindow(child);
- } else if (wm::IsWindowFullscreen(child)) {
- child_bounds = gfx::Screen::GetMonitorAreaNearestWindow(child);
- } else {
- child_bounds = gfx::Screen::GetMonitorWorkAreaNearestWindow(child).
- AdjustToFit(requested_bounds);
- }
+ if (wm::IsWindowMaximized(child)) {
+ child_bounds = gfx::Screen::GetMonitorWorkAreaNearestWindow(child);
+ } else if (wm::IsWindowFullscreen(child)) {
+ child_bounds = gfx::Screen::GetMonitorAreaNearestWindow(child);
+ } else {
+ child_bounds = gfx::Screen::GetMonitorWorkAreaNearestWindow(child).
+ AdjustToFit(requested_bounds);
}
SetChildBoundsDirect(child, child_bounds);
}
-void WorkspaceLayoutManager::OnWindowPropertyChanged(aura::Window* window,
- const void* key,
- intptr_t old) {
- if (key == ash::kWindowTrackedByWorkspaceSplitPropKey &&
- ash::GetTrackedByWorkspace(window)) {
- // We currently don't need to support transitioning from true to false, so
- // we ignore it.
- workspace_manager_->AddWindow(window);
- }
-}
-
} // namespace internal
} // namespace ash
« no previous file with comments | « ash/wm/workspace/workspace_layout_manager.h ('k') | ash/wm/workspace/workspace_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698