Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(514)

Side by Side Diff: ui/platform_window/stub/stub_window.cc

Issue 2009853002: Finish eliminating PlatformWindowMus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean-up and add TODO to WTHM Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ui/views/mus/BUILD.gn » ('j') | ui/views/mus/native_widget_mus.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/platform_window/stub/stub_window.h" 5 #include "ui/platform_window/stub/stub_window.h"
6 6
7 #include "ui/platform_window/platform_window_delegate.h" 7 #include "ui/platform_window/platform_window_delegate.h"
8 8
9 namespace ui { 9 namespace ui {
10 10
11 StubWindow::StubWindow(PlatformWindowDelegate* delegate) : delegate_(delegate) { 11 StubWindow::StubWindow(PlatformWindowDelegate* delegate) : delegate_(delegate) {
12 delegate_->OnAcceleratedWidgetAvailable(gfx::kNullAcceleratedWidget, 1.f); 12 if (delegate_)
13 delegate_->OnAcceleratedWidgetAvailable(gfx::kNullAcceleratedWidget, 1.f);
13 } 14 }
14 15
15 StubWindow::~StubWindow() { 16 StubWindow::~StubWindow() {
16 } 17 }
17 18
18 void StubWindow::Show() { 19 void StubWindow::Show() {
19 } 20 }
20 21
21 void StubWindow::Hide() { 22 void StubWindow::Hide() {
22 } 23 }
23 24
24 void StubWindow::Close() { 25 void StubWindow::Close() {
25 delegate_->OnClosed(); 26 if (delegate_)
27 delegate_->OnClosed();
26 } 28 }
27 29
28 void StubWindow::SetBounds(const gfx::Rect& bounds) { 30 void StubWindow::SetBounds(const gfx::Rect& bounds) {
29 if (bounds_ == bounds) 31 if (bounds_ == bounds)
30 return; 32 return;
31 bounds_ = bounds; 33 bounds_ = bounds;
32 delegate_->OnBoundsChanged(bounds); 34 if (delegate_)
35 delegate_->OnBoundsChanged(bounds);
33 } 36 }
34 37
35 gfx::Rect StubWindow::GetBounds() { 38 gfx::Rect StubWindow::GetBounds() {
36 return bounds_; 39 return bounds_;
37 } 40 }
38 41
39 void StubWindow::SetTitle(const base::string16& title) {} 42 void StubWindow::SetTitle(const base::string16& title) {}
40 43
41 void StubWindow::SetCapture() { 44 void StubWindow::SetCapture() {
42 } 45 }
(...skipping 20 matching lines...) Expand all
63 } 66 }
64 67
65 void StubWindow::ConfineCursorToBounds(const gfx::Rect& bounds) { 68 void StubWindow::ConfineCursorToBounds(const gfx::Rect& bounds) {
66 } 69 }
67 70
68 PlatformImeController* StubWindow::GetPlatformImeController() { 71 PlatformImeController* StubWindow::GetPlatformImeController() {
69 return nullptr; 72 return nullptr;
70 } 73 }
71 74
72 } // namespace ui 75 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | ui/views/mus/BUILD.gn » ('j') | ui/views/mus/native_widget_mus.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698