Commit b856eb2b authored by sky's avatar sky Committed by Commit bot

Starts splitting out shell window ids

BUG=603369
TEST=covered by tests
R=jamescook@chromium.org

Review URL: https://codereview.chromium.org/1920153003

Cr-Commit-Position: refs/heads/master@{#389884}
parent 3086ff0e
......@@ -5,6 +5,8 @@
#ifndef ASH_SHELL_WINDOW_IDS_H_
#define ASH_SHELL_WINDOW_IDS_H_
#include "ash/wm/common/wm_shell_window_ids.h"
// Declarations of ids of special shell windows.
namespace ash {
......@@ -43,12 +45,20 @@ const int kShellWindowId_DefaultContainer = 6;
// The container for top-level windows with the 'always-on-top' flag set.
const int kShellWindowId_AlwaysOnTopContainer = 7;
// The container for windows docked to either side of the desktop.
const int kShellWindowId_DockedContainer = 8;
// The container for windows docked to either side of the desktop. Shell id is
// defined in wm_shell_window_ids.
static_assert(kShellWindowId_AlwaysOnTopContainer + 1 ==
kShellWindowId_DockedContainer,
"docked container must be immediately after always on top");
// The container for the shelf.
const int kShellWindowId_ShelfContainer = 9;
static_assert(kShellWindowId_DockedContainer + 1 ==
kShellWindowId_ShelfContainer,
"shelf container must be immediately after docked container");
// The container for bubbles which float over the shelf.
const int kShellWindowId_ShelfBubbleContainer = 10;
......
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_WM_COMMON_WM_SHELL_WINDOW_IDS_H_
#define ASH_WM_COMMON_WM_SHELL_WINDOW_IDS_H_
#include "ash/ash_export.h"
// Defines the ids assigned to known containers. The id for a WmWindow is
// accessed via GetShellWindowId().
// TODO(sky): move this into wm namespace.
namespace ash {
const int kShellWindowId_DockedContainer = 8;
} // namespace ash
#endif // ASH_WM_COMMON_WM_SHELL_WINDOW_IDS_H_
......@@ -60,6 +60,7 @@ class ASH_EXPORT WmWindow {
// Used for debugging.
virtual void SetName(const std::string& name) = 0;
// See wm_shell_window_ids.h for list of known ids.
virtual void SetShellWindowId(int id) = 0;
virtual int GetShellWindowId() = 0;
virtual WmWindow* GetChildByShellWindowId(int id) = 0;
......
......@@ -4,7 +4,6 @@
#include "ash/wm/dock/docked_window_layout_manager.h"
#include "ash/shell_window_ids.h"
#include "ash/wm/common/shelf/wm_shelf.h"
#include "ash/wm/common/shelf/wm_shelf_constants.h"
#include "ash/wm/common/shelf/wm_shelf_observer.h"
......@@ -12,6 +11,7 @@
#include "ash/wm/common/window_parenting_utils.h"
#include "ash/wm/common/wm_globals.h"
#include "ash/wm/common/wm_root_window_controller.h"
#include "ash/wm/common/wm_shell_window_ids.h"
#include "ash/wm/common/wm_window.h"
#include "ash/wm/window_resizer.h"
#include "ash/wm/window_state.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment