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

Side by Side Diff: chrome/browser/ui/window_sizer/window_sizer_ash_unittest.cc

Issue 681823004: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/scoped_target_root_window.h" 5 #include "ash/scoped_target_root_window.h"
6 #include "ash/screen_util.h" 6 #include "ash/screen_util.h"
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/test/ash_test_base.h" 8 #include "ash/test/ash_test_base.h"
9 #include "ash/test/test_shell_delegate.h" 9 #include "ash/test/test_shell_delegate.h"
10 #include "ash/wm/window_positioner.h" 10 #include "ash/wm/window_positioner.h"
(...skipping 20 matching lines...) Expand all
31 31
32 // A browser window proxy which is able to associate an aura native window with 32 // A browser window proxy which is able to associate an aura native window with
33 // it. 33 // it.
34 class TestBrowserWindowAura : public TestBrowserWindow { 34 class TestBrowserWindowAura : public TestBrowserWindow {
35 public: 35 public:
36 // |native_window| will still be owned by the caller after the constructor 36 // |native_window| will still be owned by the caller after the constructor
37 // was called. 37 // was called.
38 explicit TestBrowserWindowAura(aura::Window* native_window) 38 explicit TestBrowserWindowAura(aura::Window* native_window)
39 : native_window_(native_window) { 39 : native_window_(native_window) {
40 } 40 }
41 virtual ~TestBrowserWindowAura() {} 41 ~TestBrowserWindowAura() override {}
42 42
43 // TestBrowserWindow overrides: 43 // TestBrowserWindow overrides:
44 virtual void Show() override { 44 void Show() override {
45 native_window_->Show(); 45 native_window_->Show();
46 Activate(); 46 Activate();
47 } 47 }
48 virtual void Hide() override { 48 void Hide() override { native_window_->Hide(); }
49 native_window_->Hide(); 49 void Activate() override {
50 }
51 virtual void Activate() override {
52 aura::client::GetActivationClient( 50 aura::client::GetActivationClient(
53 native_window_->GetRootWindow())->ActivateWindow(native_window_.get()); 51 native_window_->GetRootWindow())->ActivateWindow(native_window_.get());
54 } 52 }
55 virtual gfx::NativeWindow GetNativeWindow() override { 53 gfx::NativeWindow GetNativeWindow() override { return native_window_.get(); }
56 return native_window_.get(); 54 gfx::Rect GetBounds() const override { return native_window_->bounds(); }
57 }
58 virtual gfx::Rect GetBounds() const override {
59 return native_window_->bounds();
60 }
61 55
62 Browser* browser() { return browser_.get(); } 56 Browser* browser() { return browser_.get(); }
63 57
64 void CreateBrowser(const Browser::CreateParams& params) { 58 void CreateBrowser(const Browser::CreateParams& params) {
65 Browser::CreateParams create_params = params; 59 Browser::CreateParams create_params = params;
66 create_params.window = this; 60 create_params.window = this;
67 browser_.reset(new Browser(create_params)); 61 browser_.reset(new Browser(create_params));
68 if (browser_->is_type_tabbed() || browser_->is_app()) { 62 if (browser_->is_type_tabbed() || browser_->is_app()) {
69 ash::wm::GetWindowState(native_window_.get())-> 63 ash::wm::GetWindowState(native_window_.get())->
70 set_window_position_managed(true); 64 set_window_position_managed(true);
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after
1004 p1600x1200)); 998 p1600x1200));
1005 // A popup that is sized to occupy the whole work area has default state. 999 // A popup that is sized to occupy the whole work area has default state.
1006 EXPECT_EQ(ui::SHOW_STATE_DEFAULT, 1000 EXPECT_EQ(ui::SHOW_STATE_DEFAULT,
1007 GetWindowShowState(ui::SHOW_STATE_DEFAULT, 1001 GetWindowShowState(ui::SHOW_STATE_DEFAULT,
1008 ui::SHOW_STATE_NORMAL, 1002 ui::SHOW_STATE_NORMAL,
1009 BOTH, 1003 BOTH,
1010 trusted_popup->browser(), 1004 trusted_popup->browser(),
1011 p1600x1200, 1005 p1600x1200,
1012 p1600x1200)); 1006 p1600x1200));
1013 } 1007 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/window_sizer/window_sizer_ash_uitest.cc ('k') | chrome/browser/ui/zoom/zoom_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698