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

Side by Side Diff: chrome/browser/ui/ash/chrome_screenshot_grabber.h

Issue 706013004: Move non-browser specific ScreenshotTaker code to ui/snapshot. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge and fix gn Created 6 years 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 | « chrome/browser/ui/ash/ash_init.cc ('k') | chrome/browser/ui/ash/chrome_screenshot_grabber.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_ASH_CHROME_SCREENSHOT_GRABBER_H_
6 #define CHROME_BROWSER_UI_ASH_CHROME_SCREENSHOT_GRABBER_H_
7
8 #include "ash/screenshot_delegate.h"
9 #include "chrome/browser/notifications/notification.h"
10 #include "ui/snapshot/screenshot_grabber.h"
11
12 class Profile;
13
14 namespace ash {
15 namespace test {
16 class ChromeScreenshotGrabberTest;
17 } // namespace test
18 } // namespace ash
19
20 class ChromeScreenshotGrabber : public ash::ScreenshotDelegate,
21 public ui::ScreenshotGrabberDelegate,
22 public ui::ScreenshotGrabberObserver {
23 public:
24 ChromeScreenshotGrabber();
25 ~ChromeScreenshotGrabber() override;
26
27 ui::ScreenshotGrabber* screenshot_grabber() {
28 return screenshot_grabber_.get();
29 }
30
31 // ash::ScreenshotDelegate:
32 void HandleTakeScreenshotForAllRootWindows() override;
33 void HandleTakePartialScreenshot(aura::Window* window,
34 const gfx::Rect& rect) override;
35 bool CanTakeScreenshot() override;
36
37 // ui::ScreenshotGrabberDelegate:
38 void PrepareFileAndRunOnBlockingPool(
39 const base::FilePath& path,
40 scoped_refptr<base::TaskRunner> blocking_task_runner,
41 const FileCallback& callback_on_blocking_pool) override;
42
43 // ui::ScreenshotGrabberObserver:
44 void OnScreenshotCompleted(ui::ScreenshotGrabberObserver::Result result,
45 const base::FilePath& screenshot_path) override;
46
47 private:
48 friend class ash::test::ChromeScreenshotGrabberTest;
49
50 #if defined(OS_CHROMEOS)
51 Notification* CreateNotification(
52 ui::ScreenshotGrabberObserver::Result screenshot_result,
53 const base::FilePath& screenshot_path);
54 #endif
55
56 void SetProfileForTest(Profile* profile);
57 Profile* GetProfile();
58
59 scoped_ptr<ui::ScreenshotGrabber> screenshot_grabber_;
60 Profile* profile_for_test_;
61
62 DISALLOW_COPY_AND_ASSIGN(ChromeScreenshotGrabber);
63 };
64
65 #endif // CHROME_BROWSER_UI_ASH_CHROME_SCREENSHOT_GRABBER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/ash_init.cc ('k') | chrome/browser/ui/ash/chrome_screenshot_grabber.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698