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

Unified Diff: chrome/browser/policy/policy_browsertest.cc

Issue 706013004: Move non-browser specific ScreenshotTaker code to ui/snapshot. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restrict to use_aura==1 and fix gn build 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/policy/policy_browsertest.cc
diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc
index 6aa46a90c6ec0d32891b7b3da81641f7495c271e..8a0dd405beecde066417eff18b03c7b929fe331f 100644
--- a/chrome/browser/policy/policy_browsertest.cc
+++ b/chrome/browser/policy/policy_browsertest.cc
@@ -161,8 +161,9 @@
#include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
#include "chrome/browser/chromeos/accessibility/magnification_manager.h"
#include "chrome/browser/profiles/profile_manager.h"
-#include "chrome/browser/ui/ash/screenshot_taker.h"
+#include "chrome/browser/ui/ash/chrome_screenshot_taker.h"
#include "chromeos/audio/cras_audio_handler.h"
+#include "components/screenshot_taker/screenshot_taker.h"
#include "ui/chromeos/accessibility_types.h"
#include "ui/keyboard/keyboard_util.h"
#endif
@@ -668,12 +669,13 @@ class PolicyTest : public InProcessBrowserTest {
void TestScreenshotFile(bool enabled) {
// AddObserver is an ash-specific method, so just replace the screenshot
// taker with one we've created here.
- scoped_ptr<ScreenshotTaker> screenshot_taker(new ScreenshotTaker);
+ scoped_ptr<ChromeScreenshotTaker> chrome_screenshot_taker(
+ new ChromeScreenshotTaker);
// ScreenshotTaker doesn't own this observer, so the observer's lifetime
// is tied to the test instead.
- screenshot_taker->AddObserver(&observer_);
+ chrome_screenshot_taker->screenshot_taker()->AddObserver(&observer_);
ash::Shell::GetInstance()->accelerator_controller()->SetScreenshotDelegate(
- screenshot_taker.Pass());
+ chrome_screenshot_taker.Pass());
SetScreenshotPolicy(enabled);
ash::Shell::GetInstance()->accelerator_controller()->PerformAction(

Powered by Google App Engine
This is Rietveld 408576698