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

Side by Side Diff: ui/views/test/views_test_helper_aura.cc

Issue 2466023003: Makes CaptureController be created and owned by WMState (Closed)
Patch Set: moar Created 4 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
« no previous file with comments | « ui/views/corewm/desktop_capture_controller_unittest.cc ('k') | ui/wm/core/capture_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/test/views_test_helper_aura.h" 5 #include "ui/views/test/views_test_helper_aura.h"
6 6
7 #include "ui/aura/client/screen_position_client.h" 7 #include "ui/aura/client/screen_position_client.h"
8 #include "ui/aura/test/aura_test_helper.h" 8 #include "ui/aura/test/aura_test_helper.h"
9 #include "ui/wm/core/capture_controller.h" 9 #include "ui/wm/core/capture_controller.h"
10 #include "ui/wm/core/default_activation_client.h" 10 #include "ui/wm/core/default_activation_client.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // So, although it's optional, check the root window to detect failures before 47 // So, although it's optional, check the root window to detect failures before
48 // they hit the CQ on other platforms. 48 // they hit the CQ on other platforms.
49 DCHECK(aura_test_helper_->root_window()->children().empty()) 49 DCHECK(aura_test_helper_->root_window()->children().empty())
50 << "Not all windows were closed."; 50 << "Not all windows were closed.";
51 51
52 if (screen_position_client_.get() == 52 if (screen_position_client_.get() ==
53 aura::client::GetScreenPositionClient(GetContext())) 53 aura::client::GetScreenPositionClient(GetContext()))
54 aura::client::SetScreenPositionClient(GetContext(), nullptr); 54 aura::client::SetScreenPositionClient(GetContext(), nullptr);
55 55
56 aura_test_helper_->TearDown(); 56 aura_test_helper_->TearDown();
57 CHECK(!wm::ScopedCaptureClient::IsActive()); 57 CHECK(!wm::CaptureController::Get() ||
58 !wm::CaptureController::Get()->is_active());
58 } 59 }
59 60
60 gfx::NativeWindow ViewsTestHelperAura::GetContext() { 61 gfx::NativeWindow ViewsTestHelperAura::GetContext() {
61 return aura_test_helper_->root_window(); 62 return aura_test_helper_->root_window();
62 } 63 }
63 64
64 } // namespace views 65 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/corewm/desktop_capture_controller_unittest.cc ('k') | ui/wm/core/capture_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698