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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc

Issue 623293004: replace OVERRIDE and FINAL with override and final in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 6 years, 2 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/views/widget/desktop_aura/desktop_native_widget_aura.h" 5 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "ui/aura/client/aura_constants.h" 8 #include "ui/aura/client/aura_constants.h"
9 #include "ui/aura/client/cursor_client.h" 9 #include "ui/aura/client/cursor_client.h"
10 #include "ui/aura/client/window_tree_client.h" 10 #include "ui/aura/client/window_tree_client.h"
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 virtual ~DesktopAuraTopLevelWindowTest() { 254 virtual ~DesktopAuraTopLevelWindowTest() {
255 EXPECT_TRUE(owner_destroyed_); 255 EXPECT_TRUE(owner_destroyed_);
256 EXPECT_TRUE(owned_window_destroyed_); 256 EXPECT_TRUE(owned_window_destroyed_);
257 top_level_widget_ = NULL; 257 top_level_widget_ = NULL;
258 owned_window_ = NULL; 258 owned_window_ = NULL;
259 } 259 }
260 260
261 // views::TestViewsDelegate overrides. 261 // views::TestViewsDelegate overrides.
262 virtual void OnBeforeWidgetInit( 262 virtual void OnBeforeWidgetInit(
263 Widget::InitParams* params, 263 Widget::InitParams* params,
264 internal::NativeWidgetDelegate* delegate) OVERRIDE { 264 internal::NativeWidgetDelegate* delegate) override {
265 if (!params->native_widget) 265 if (!params->native_widget)
266 params->native_widget = new views::DesktopNativeWidgetAura(delegate); 266 params->native_widget = new views::DesktopNativeWidgetAura(delegate);
267 } 267 }
268 268
269 void CreateTopLevelWindow(const gfx::Rect& bounds, bool fullscreen) { 269 void CreateTopLevelWindow(const gfx::Rect& bounds, bool fullscreen) {
270 Widget::InitParams init_params; 270 Widget::InitParams init_params;
271 init_params.type = Widget::InitParams::TYPE_WINDOW; 271 init_params.type = Widget::InitParams::TYPE_WINDOW;
272 init_params.bounds = bounds; 272 init_params.bounds = bounds;
273 init_params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; 273 init_params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
274 init_params.layer_type = aura::WINDOW_LAYER_NOT_DRAWN; 274 init_params.layer_type = aura::WINDOW_LAYER_NOT_DRAWN;
(...skipping 29 matching lines...) Expand all
304 void DestroyOwnedWindow() { 304 void DestroyOwnedWindow() {
305 ASSERT_TRUE(owned_window_ != NULL); 305 ASSERT_TRUE(owned_window_ != NULL);
306 delete owned_window_; 306 delete owned_window_;
307 } 307 }
308 308
309 void DestroyOwnerWindow() { 309 void DestroyOwnerWindow() {
310 ASSERT_TRUE(top_level_widget_ != NULL); 310 ASSERT_TRUE(top_level_widget_ != NULL);
311 top_level_widget_->CloseNow(); 311 top_level_widget_->CloseNow();
312 } 312 }
313 313
314 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE { 314 virtual void OnWindowDestroying(aura::Window* window) override {
315 window->RemoveObserver(this); 315 window->RemoveObserver(this);
316 if (window == owned_window_) { 316 if (window == owned_window_) {
317 owned_window_destroyed_ = true; 317 owned_window_destroyed_ = true;
318 } else if (window == top_level_widget_->GetNativeView()) { 318 } else if (window == top_level_widget_->GetNativeView()) {
319 owner_destroyed_ = true; 319 owner_destroyed_ = true;
320 } else { 320 } else {
321 ADD_FAILURE() << "Unexpected window destroyed callback: " << window; 321 ADD_FAILURE() << "Unexpected window destroyed callback: " << window;
322 } 322 }
323 } 323 }
324 324
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 390
391 EXPECT_EQ(popup_window.top_level_widget()->GetNativeView()->bounds().size(), 391 EXPECT_EQ(popup_window.top_level_widget()->GetNativeView()->bounds().size(),
392 new_size.size()); 392 new_size.size());
393 RunPendingMessages(); 393 RunPendingMessages();
394 ASSERT_NO_FATAL_FAILURE(popup_window.DestroyOwnedWindow()); 394 ASSERT_NO_FATAL_FAILURE(popup_window.DestroyOwnedWindow());
395 RunPendingMessages(); 395 RunPendingMessages();
396 } 396 }
397 397
398 } // namespace test 398 } // namespace test
399 } // namespace views 399 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698