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

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: Fix missing comma. 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
« no previous file with comments | « no previous file | chrome/browser/ui/ash/ash_init.cc » ('j') | chrome/browser/ui/ash/chrome_screenshot_taker.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/policy_browsertest.cc
diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc
index 89fb7f1b57546349dc4aaee36d75d4d2fc56b3cb..25a92c4a9bde1d61e8e2f6b9a4d710c58f477384 100644
--- a/chrome/browser/policy/policy_browsertest.cc
+++ b/chrome/browser/policy/policy_browsertest.cc
@@ -162,10 +162,11 @@
#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 "ui/chromeos/accessibility_types.h"
#include "ui/keyboard/keyboard_util.h"
+#include "ui/snapshot/screenshot_taker.h"
#endif
#if !defined(OS_MACOSX)
@@ -652,7 +653,7 @@ class PolicyTest : public InProcessBrowserTest {
}
#if defined(OS_CHROMEOS)
- class QuitMessageLoopAfterScreenshot : public ScreenshotTakerObserver {
+ class QuitMessageLoopAfterScreenshot : public ui::ScreenshotTakerObserver {
public:
virtual void OnScreenshotCompleted(
ScreenshotTakerObserver::Result screenshot_result,
@@ -669,12 +670,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_);
sky 2014/11/20 15:03:58 RemoveObserver?
flackr 2014/11/26 18:05:08 Done.
ash::Shell::GetInstance()->accelerator_controller()->SetScreenshotDelegate(
- screenshot_taker.Pass());
+ chrome_screenshot_taker.Pass());
SetScreenshotPolicy(enabled);
ash::Shell::GetInstance()->accelerator_controller()->PerformAction(
« no previous file with comments | « no previous file | chrome/browser/ui/ash/ash_init.cc » ('j') | chrome/browser/ui/ash/chrome_screenshot_taker.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698