feat: add app.getApplicationInfoForProtocol API (#24112)
* pre merge * windows changes * added tests * clean up * more cleanup * lint error * windows 7 support * added windows 7 implementation * code review * lint and code review * code review * app.md merge conflict * merge conflict app.md accidently deleted code block * 'lint' * mis-moved getapplicationinfoforprotocol() into anonymous namespace * fix test * lint * code review
This commit is contained in:
parent
2cbd091e89
commit
ee61eb9aa4
6 changed files with 261 additions and 20 deletions
|
@ -13,7 +13,9 @@
|
|||
#include "base/macros.h"
|
||||
#include "base/observer_list.h"
|
||||
#include "base/strings/string16.h"
|
||||
#include "base/task/cancelable_task_tracker.h"
|
||||
#include "base/values.h"
|
||||
#include "gin/dictionary.h"
|
||||
#include "shell/browser/browser_observer.h"
|
||||
#include "shell/browser/window_list_observer.h"
|
||||
#include "shell/common/gin_helper/promise.h"
|
||||
|
@ -98,6 +100,12 @@ class Browser : public WindowListObserver {
|
|||
|
||||
base::string16 GetApplicationNameForProtocol(const GURL& url);
|
||||
|
||||
#if !defined(OS_LINUX)
|
||||
// get the name, icon and path for an application
|
||||
v8::Local<v8::Promise> GetApplicationInfoForProtocol(v8::Isolate* isolate,
|
||||
const GURL& url);
|
||||
#endif
|
||||
|
||||
// Set/Get the badge count.
|
||||
bool SetBadgeCount(int count);
|
||||
int GetBadgeCount();
|
||||
|
@ -302,6 +310,9 @@ class Browser : public WindowListObserver {
|
|||
// Observers of the browser.
|
||||
base::ObserverList<BrowserObserver> observers_;
|
||||
|
||||
// Tracks tasks requesting file icons.
|
||||
base::CancelableTaskTracker cancelable_task_tracker_;
|
||||
|
||||
// Whether `app.exit()` has been called
|
||||
bool is_exiting_ = false;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue