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

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

Issue 169643005: Adding a gray semi transparent backdrop behind the topmost window within the default container (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing build problem Created 6 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 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_layout_manager_delegate.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
diff --git a/ash/wm/workspace/workspace_layout_manager.cc b/ash/wm/workspace/workspace_layout_manager.cc
index 1aaebf9bf38dc0d5700ae6142a9408ad5ce0eaf8..687324ce7bd4714ffc5bbceb388fd2f2b7537466 100644
--- a/ash/wm/workspace/workspace_layout_manager.cc
+++ b/ash/wm/workspace/workspace_layout_manager.cc
@@ -17,6 +17,7 @@
#include "ash/wm/window_state.h"
#include "ash/wm/window_util.h"
#include "ash/wm/wm_event.h"
+#include "ash/wm/workspace/workspace_layout_manager_delegate.h"
#include "ui/aura/client/activation_client.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/window.h"
@@ -50,12 +51,8 @@ WorkspaceLayoutManager::WorkspaceLayoutManager(aura::Window* window)
WorkspaceLayoutManager::~WorkspaceLayoutManager() {
if (root_window_)
root_window_->RemoveObserver(this);
- for (WindowSet::const_iterator i = windows_.begin();
- i != windows_.end();
- ++i) {
+ for (WindowSet::const_iterator i = windows_.begin(); i != windows_.end(); ++i)
(*i)->RemoveObserver(this);
- wm::GetWindowState(*i)->RemoveObserver(this);
- }
Shell::GetInstance()->RemoveShellObserver(this);
Shell::GetInstance()->activation_client()->RemoveObserver(this);
}
@@ -64,6 +61,11 @@ void WorkspaceLayoutManager::SetShelf(internal::ShelfLayoutManager* shelf) {
shelf_ = shelf;
}
+void WorkspaceLayoutManager::SetMaximizeBackdropDelegate(
+ scoped_ptr<WorkspaceLayoutManagerDelegate> delegate) {
+ backdrop_delegate_.reset(delegate.release());
+}
+
//////////////////////////////////////////////////////////////////////////////
// WorkspaceLayoutManager, aura::LayoutManager implementation:
@@ -76,6 +78,8 @@ void WorkspaceLayoutManager::OnWindowAddedToLayout(Window* child) {
window_state->AddObserver(this);
UpdateShelfVisibility();
UpdateFullscreenState();
+ if (backdrop_delegate_)
+ backdrop_delegate_->OnWindowAddedToLayout(child);
WindowPositioner::RearrangeVisibleWindowOnShow(child);
}
@@ -91,6 +95,8 @@ void WorkspaceLayoutManager::OnWillRemoveWindowFromLayout(Window* child) {
void WorkspaceLayoutManager::OnWindowRemovedFromLayout(Window* child) {
UpdateShelfVisibility();
UpdateFullscreenState();
+ if (backdrop_delegate_)
+ backdrop_delegate_->OnWindowRemovedFromLayout(child);
}
void WorkspaceLayoutManager::OnChildWindowVisibilityChanged(Window* child,
@@ -106,6 +112,8 @@ void WorkspaceLayoutManager::OnChildWindowVisibilityChanged(Window* child,
WindowPositioner::RearrangeVisibleWindowOnHideOrRemove(child);
UpdateFullscreenState();
UpdateShelfVisibility();
+ if (backdrop_delegate_)
+ backdrop_delegate_->OnChildWindowVisibilityChanged(child, visible);
}
void WorkspaceLayoutManager::SetChildBounds(
@@ -166,6 +174,8 @@ void WorkspaceLayoutManager::OnWindowPropertyChanged(Window* window,
void WorkspaceLayoutManager::OnWindowStackingChanged(aura::Window* window) {
UpdateShelfVisibility();
UpdateFullscreenState();
+ if (backdrop_delegate_)
+ backdrop_delegate_->OnWindowStackingChanged(window);
}
void WorkspaceLayoutManager::OnWindowDestroying(aura::Window* window) {
@@ -214,6 +224,8 @@ void WorkspaceLayoutManager::OnPostWindowStateTypeChange(
}
UpdateShelfVisibility();
+ if (backdrop_delegate_)
+ backdrop_delegate_->OnPostWindowStateTypeChange(window_state, old_type);
}
//////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « ash/wm/workspace/workspace_layout_manager.h ('k') | ash/wm/workspace/workspace_layout_manager_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698