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

Unified Diff: ui/platform_window/stub/stub_window.cc

Issue 2040783002: Drop unnecessary override of OnWindowBoundsChanged in NativeWidgetMus::MusWindowObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/platform_window/stub/stub_window.h ('k') | ui/platform_window/stub/stub_window.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/platform_window/stub/stub_window.cc
diff --git a/ui/platform_window/stub/stub_window.cc b/ui/platform_window/stub/stub_window.cc
index da7fd6227b78c7e3430fa07dfcd07d093e99c047..3c562c41318c057fa95fc6c61cb65e93d20c2c0d 100644
--- a/ui/platform_window/stub/stub_window.cc
+++ b/ui/platform_window/stub/stub_window.cc
@@ -4,12 +4,16 @@
#include "ui/platform_window/stub/stub_window.h"
+#include "base/logging.h"
#include "ui/platform_window/platform_window_delegate.h"
namespace ui {
-StubWindow::StubWindow(PlatformWindowDelegate* delegate) : delegate_(delegate) {
- if (delegate_)
+StubWindow::StubWindow(PlatformWindowDelegate* delegate,
+ bool use_default_accelerated_widget)
+ : delegate_(delegate) {
+ DCHECK(delegate);
+ if (use_default_accelerated_widget)
delegate_->OnAcceleratedWidgetAvailable(gfx::kNullAcceleratedWidget, 1.f);
}
@@ -23,16 +27,14 @@ void StubWindow::Hide() {
}
void StubWindow::Close() {
- if (delegate_)
- delegate_->OnClosed();
+ delegate_->OnClosed();
}
void StubWindow::SetBounds(const gfx::Rect& bounds) {
if (bounds_ == bounds)
return;
bounds_ = bounds;
- if (delegate_)
- delegate_->OnBoundsChanged(bounds);
+ delegate_->OnBoundsChanged(bounds);
}
gfx::Rect StubWindow::GetBounds() {
« no previous file with comments | « ui/platform_window/stub/stub_window.h ('k') | ui/platform_window/stub/stub_window.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698