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

Unified Diff: chrome/browser/chromeos/note_taking_helper.h

Issue 2526893003: chromeos: Add NoteTakingHelper class. (Closed)
Patch Set: drop is-note-taking-app-window stuff Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/note_taking_app_utils.cc ('k') | chrome/browser/chromeos/note_taking_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/note_taking_helper.h
diff --git a/chrome/browser/chromeos/note_taking_helper.h b/chrome/browser/chromeos/note_taking_helper.h
new file mode 100644
index 0000000000000000000000000000000000000000..f8175e8ed348d3fde674b3ab2e7ee6a302477bce
--- /dev/null
+++ b/chrome/browser/chromeos/note_taking_helper.h
@@ -0,0 +1,43 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CHROMEOS_NOTE_TAKING_HELPER_H_
+#define CHROME_BROWSER_CHROMEOS_NOTE_TAKING_HELPER_H_
+
+#include <base/macros.h>
+
+class Profile;
+
+namespace base {
+class FilePath;
+} // namespace base
+
+namespace chromeos {
+
+// Singleton class used to launch a note-taking app.
+class NoteTakingHelper {
+ public:
+ static void Initialize();
+ static void Shutdown();
Daniel Erat 2016/12/02 01:07:55 should be "ShutDown" but i'm matching what we call
+ static NoteTakingHelper* Get();
+
+ // Returns true if an app that can be used to take notes is available. UI
+ // surfaces that call LaunchAppForNewNote() should be hidden otherwise.
+ bool IsAppAvailable(Profile* profile);
+
+ // Launches the note-taking app to create a new note, optionally additionally
+ // passing a file (|path| may be empty). IsAppAvailable() must be called
+ // first.
+ void LaunchAppForNewNote(Profile* profile, const base::FilePath& path);
+
+ private:
+ NoteTakingHelper();
+ ~NoteTakingHelper();
+
+ DISALLOW_COPY_AND_ASSIGN(NoteTakingHelper);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_NOTE_TAKING_HELPER_H_
« no previous file with comments | « chrome/browser/chromeos/note_taking_app_utils.cc ('k') | chrome/browser/chromeos/note_taking_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698