OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef CHROME_BROWSER_CHROMEOS_NOTE_TAKING_APP_UTILS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_NOTE_TAKING_APP_UTILS_H_ |
6 #define CHROME_BROWSER_CHROMEOS_NOTE_TAKING_APP_UTILS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_NOTE_TAKING_APP_UTILS_H_ |
7 | 7 |
8 class Profile; | 8 class Profile; |
9 | 9 |
10 namespace base { | 10 namespace base { |
11 class FilePath; | 11 class FilePath; |
12 } // namespace base | 12 } // namespace base |
13 | 13 |
14 namespace extensions { | |
15 class AppWindow; | |
16 } // namespace extensions | |
17 | |
14 namespace chromeos { | 18 namespace chromeos { |
15 | 19 |
16 // Returns true if an app that can be used to take notes is available. | 20 // Returns true if an app that can be used to take notes is available. |
17 bool IsNoteTakingAppAvailable(Profile* profile); | 21 bool IsNoteTakingAppAvailable(Profile* profile); |
18 | 22 |
19 // Launches the note-taking app to create a new note, optionally additionally | 23 // Launches the note-taking app to create a new note, optionally additionally |
20 // passing a file (|path| may be empty). IsNoteTakingAppAvailable() must be | 24 // passing a file (|path| may be empty). IsNoteTakingAppAvailable() must be |
21 // called first. | 25 // called first. |
22 void LaunchNoteTakingAppForNewNote(Profile* profile, | 26 void LaunchNoteTakingAppForNewNote(Profile* profile, |
23 const base::FilePath& path); | 27 const base::FilePath& path); |
24 | 28 |
29 // Returns true if current app window is note taking app window. | |
Daniel Erat
2016/09/27 19:15:10
nit: "Returns true if |app_window| belongs to the
xiaoyinh(OOO Sep 11-29)
2016/09/29 20:37:43
Done.
| |
30 bool IsNoteTakingApp(extensions::AppWindow* app_window, Profile* profile); | |
Daniel Erat
2016/09/27 19:15:10
i'd rename this to IsNoteTakingAppWindow() to make
xiaoyinh(OOO Sep 11-29)
2016/09/29 20:37:43
Done.
| |
31 | |
25 } // namespace chromeos | 32 } // namespace chromeos |
26 | 33 |
27 #endif // CHROME_BROWSER_CHROMEOS_NOTE_TAKING_APP_UTILS_H_ | 34 #endif // CHROME_BROWSER_CHROMEOS_NOTE_TAKING_APP_UTILS_H_ |
OLD | NEW |