Roll src/third_party/WebKit a3b4a2e:7441784 (svn 202551:202552)
[chromium-blink-merge.git] / ui / platform_window / stub / stub_window.cc
bloba46f89d656dfe7a41f49fe855782c92ee0ea5b8f
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"
9 namespace ui {
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)
30 return;
31 bounds_ = bounds;
32 delegate_->OnBoundsChanged(bounds);
35 gfx::Rect StubWindow::GetBounds() {
36 return bounds_;
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() {
69 return nullptr;
72 } // namespace ui