1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ui/platform_window/stub/stub_window.h"
7 #include "ui/platform_window/platform_window_delegate.h"
11 StubWindow::StubWindow(PlatformWindowDelegate
* delegate
) : delegate_(delegate
) {
12 delegate_
->OnAcceleratedWidgetAvailable(gfx::kNullAcceleratedWidget
, 1.f
);
15 StubWindow::~StubWindow() {
18 void StubWindow::Show() {
21 void StubWindow::Hide() {
24 void StubWindow::Close() {
25 delegate_
->OnClosed();
28 void StubWindow::SetBounds(const gfx::Rect
& bounds
) {
29 if (bounds_
== bounds
)
32 delegate_
->OnBoundsChanged(bounds
);
35 gfx::Rect
StubWindow::GetBounds() {
39 void StubWindow::SetTitle(const base::string16
& title
) {}
41 void StubWindow::SetCapture() {
44 void StubWindow::ReleaseCapture() {
47 void StubWindow::ToggleFullscreen() {
50 void StubWindow::Maximize() {
53 void StubWindow::Minimize() {
56 void StubWindow::Restore() {
59 void StubWindow::SetCursor(PlatformCursor cursor
) {
62 void StubWindow::MoveCursorTo(const gfx::Point
& location
) {
65 void StubWindow::ConfineCursorToBounds(const gfx::Rect
& bounds
) {
68 PlatformImeController
* StubWindow::GetPlatformImeController() {