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 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
|
// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/ash/shelf/app_window_base.h"
#include "chrome/browser/ui/ash/shelf/app_window_shelf_item_controller.h"
#include "ui/base/mojom/window_show_state.mojom.h"
#include "ui/views/widget/widget.h"
AppWindowBase::AppWindowBase(const ash::ShelfID& shelf_id,
views::Widget* widget)
: shelf_id_(shelf_id), widget_(widget) {}
AppWindowBase::~AppWindowBase() {
if (controller_) {
controller_->RemoveWindow(this);
}
}
void AppWindowBase::SetController(AppWindowShelfItemController* controller) {
DCHECK(!controller_ || !controller);
if (!controller && controller_) {
controller_->RemoveWindow(this);
}
controller_ = controller;
}
bool AppWindowBase::IsActive() const {
return widget_->IsActive();
}
bool AppWindowBase::IsMaximized() const {
NOTREACHED();
}
bool AppWindowBase::IsMinimized() const {
NOTREACHED();
}
bool AppWindowBase::IsFullscreen() const {
NOTREACHED();
}
gfx::NativeWindow AppWindowBase::GetNativeWindow() const {
return widget_ ? widget_->GetNativeWindow() : nullptr;
}
gfx::Rect AppWindowBase::GetRestoredBounds() const {
NOTREACHED();
}
ui::mojom::WindowShowState AppWindowBase::GetRestoredState() const {
NOTREACHED();
}
gfx::Rect AppWindowBase::GetBounds() const {
NOTREACHED();
}
void AppWindowBase::Show() {
widget_->Show();
}
void AppWindowBase::ShowInactive() {
NOTREACHED();
}
void AppWindowBase::Hide() {
NOTREACHED();
}
bool AppWindowBase::IsVisible() const {
NOTREACHED();
}
void AppWindowBase::Close() {
widget_->Close();
}
void AppWindowBase::Activate() {
widget_->Activate();
}
void AppWindowBase::Deactivate() {
NOTREACHED();
}
void AppWindowBase::Maximize() {
NOTREACHED();
}
void AppWindowBase::Minimize() {
widget_->Minimize();
}
void AppWindowBase::Restore() {
NOTREACHED();
}
void AppWindowBase::SetBounds(const gfx::Rect& bounds) {
NOTREACHED();
}
void AppWindowBase::FlashFrame(bool flash) {
NOTREACHED();
}
ui::ZOrderLevel AppWindowBase::GetZOrderLevel() const {
NOTREACHED();
}
void AppWindowBase::SetZOrderLevel(ui::ZOrderLevel level) {
NOTREACHED();
}
|