1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
   76
   77
   78
   79
   80
   81
   82
   83
   84
   85
   86

ash / wm / window_properties.h [blame]

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef ASH_WM_WINDOW_PROPERTIES_H_
#define ASH_WM_WINDOW_PROPERTIES_H_

#include <string>

#include "ash/ash_export.h"
#include "ui/base/class_property.h"

namespace aura {
template <typename T>
using WindowProperty = ui::ClassProperty<T>;
}

namespace ash {

class WindowState;

// Shell-specific window property keys; some keys are exported for use in tests.

// Alphabetical sort.

// A property key to indicate whether the window shadow will be disabled when
// resizing is available.
ASH_EXPORT extern const aura::WindowProperty<bool>* const kDisableResizeShadow;

// A property key to indicate whether this window is temporarily hidden because
// of the window dragging.
ASH_EXPORT extern const aura::WindowProperty<bool>* const
    kHideDuringWindowDragging;

// Used to override the icon image used for window's icon.
ASH_EXPORT extern const aura::WindowProperty<int>* const
    kOverrideWindowIconResourceIdKey;

// A property key attached to the overview windows (contains header, backdrop,
// etc.). Overview windows behave a little different from windows tagged with
// just `kOverviewUiKey`. For instance, they do not get moved if the active desk
// is destroyed.
extern const aura::WindowProperty<bool>* const kIsOverviewItemKey;

// If this is set to true, the window stays in the same root window even if the
// bounds outside of its root window is set.
ASH_EXPORT extern const aura::WindowProperty<bool>* const kLockedToRootKey;

// A property key indicating that this window is created as part of the overview
// mode UI. These windows will not cause overview to end on activation, will not
// show up in the MRU tracker and will be moved to the active desk on desk
// change.
ASH_EXPORT extern const aura::WindowProperty<bool>* const kOverviewUiKey;

// If we are in overview mode, and then activate a window, we will normally exit
// overview. Set this property to true if that behavior is not desired.
ASH_EXPORT extern const aura::WindowProperty<bool>* const
    kStayInOverviewOnActivationKey;

// A property key indicating a unique WebAuthn request id for ash to locate the
// window initiating the request.
ASH_EXPORT extern const aura::WindowProperty<std::string*>* const
    kWebAuthnRequestId;

// A property key to indicate the resize histogram name for a specific window.
// Must be set with kWindowResizeMaxLatencyHistogramName. This will have no
// affect on windows that do not use a DefaultWindowResizer for resizing.
ASH_EXPORT extern const aura::WindowProperty<std::string*>* const
    kWindowResizeHistogramName;

// A property key to indicate the resize max latency histogram name for a
// specific window. Must be set with kWindowResizeHistogramName. This will have
// no affect on windows that do not use a DefaultWindowResizer for resizing.
ASH_EXPORT extern const aura::WindowProperty<std::string*>* const
    kWindowResizeMaxLatencyHistogramName;

// A property key to store WindowState in the window. The window state
// is owned by the window.
ASH_EXPORT extern const aura::WindowProperty<WindowState*>* const
    kWindowStateKey;

// Alphabetical sort.

}  // namespace ash

#endif  // ASH_WM_WINDOW_PROPERTIES_H_