08a51f3339
* chore: bump chromium in DEPS to 121.0.6154.0 * chore: bump chromium in DEPS to 121.0.6155.0 * fix patches * chore: update patches * patch out reference to GetOcclusionTracker * un-flag PIPOcclusionTracker * chore: bump chromium in DEPS to 121.0.6157.0 * fix conflicts https://chromium-review.googlesource.com/c/chromium/src/+/5038807 * add PIP occlusion tracker sources to chromium_src * 5037591: Replace feature_list's Initialize* methods with Init*. https://chromium-review.googlesource.com/c/chromium/src/+/5037591 * 4811903: Move //content/browser/renderer_host/input/synthetic_gesture_controller to //content/common/input https://chromium-review.googlesource.com/c/chromium/src/+/4811903 * 4917953: usb: Add usb-unrestricted to permission policy https://chromium-review.googlesource.com/c/chromium/src/+/4917953 * 5072395: Remove unused `creation_context` parameter from blink/public APIs https://chromium-review.googlesource.com/c/chromium/src/+/5072395 * 5052035: [X11] Change AtomCache from a singleton to owned by Connection https://chromium-review.googlesource.com/c/chromium/src/+/5052035 * fix v8/.patches * node script/gen-libc++-filenames.js * 5035771: Remove the SetImage method of ImageButton https://chromium-review.googlesource.com/c/chromium/src/+/5035771 * fixup! 5052035: [X11] Change AtomCache from a singleton to owned by Connection * fixup! 5035771: Remove the SetImage method of ImageButton * chore: bump chromium in DEPS to 121.0.6159.0 * 4505903: [Extensions] Add lastAccessed property to chrome.tabs.Tab https://chromium-review.googlesource.com/c/chromium/src/+/4505903 * update patches * don't duplicate tabs API types this causes weird memory bugs if the two get out of sync * fix UAF in TrayIconCocoa not sure why this is popping up just now ... this has been broken for ages afaict * Revert "don't duplicate tabs API types" This reverts commit 80dff2efaa1297e5c191b2c69648099d6665dbff. This is failing tests with extensions API schema check failures, so revert for now. we'll fix it later. * revert v8 change causing node crashes * chore: reduce diffs in revert_api_dcheck-fail_when_we_reenter_v8_while_terminating.patch --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Jeremy Rose <jeremya@chromium.org> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: clavin <clavin@electronjs.org> Co-authored-by: Charles Kerr <charles@charleskerr.com>
54 lines
1.6 KiB
Objective-C
54 lines
1.6 KiB
Objective-C
// Copyright (c) 2014 GitHub, Inc.
|
|
// Use of this source code is governed by the MIT license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef ELECTRON_SHELL_BROWSER_UI_TRAY_ICON_COCOA_H_
|
|
#define ELECTRON_SHELL_BROWSER_UI_TRAY_ICON_COCOA_H_
|
|
|
|
#import <Cocoa/Cocoa.h>
|
|
|
|
#include <string>
|
|
|
|
#include "shell/browser/ui/tray_icon.h"
|
|
|
|
@class ElectronMenuController;
|
|
@class StatusItemView;
|
|
|
|
namespace electron {
|
|
|
|
class TrayIconCocoa : public TrayIcon {
|
|
public:
|
|
TrayIconCocoa();
|
|
~TrayIconCocoa() override;
|
|
|
|
void SetImage(const gfx::Image& image) override;
|
|
void SetPressedImage(const gfx::Image& image) override;
|
|
void SetToolTip(const std::string& tool_tip) override;
|
|
void SetTitle(const std::string& title, const TitleOptions& options) override;
|
|
std::string GetTitle() override;
|
|
void SetIgnoreDoubleClickEvents(bool ignore) override;
|
|
bool GetIgnoreDoubleClickEvents() override;
|
|
void PopUpOnUI(base::WeakPtr<ElectronMenuModel> menu_model);
|
|
void PopUpContextMenu(const gfx::Point& pos,
|
|
base::WeakPtr<ElectronMenuModel> menu_model) override;
|
|
void CloseContextMenu() override;
|
|
void SetContextMenu(raw_ptr<ElectronMenuModel> menu_model) override;
|
|
gfx::Rect GetBounds() override;
|
|
|
|
base::WeakPtr<TrayIconCocoa> GetWeakPtr() {
|
|
return weak_factory_.GetWeakPtr();
|
|
}
|
|
|
|
private:
|
|
// Electron custom view for NSStatusItem.
|
|
StatusItemView* __strong status_item_view_;
|
|
|
|
// Status menu shown when right-clicking the system icon.
|
|
ElectronMenuController* __strong menu_;
|
|
|
|
base::WeakPtrFactory<TrayIconCocoa> weak_factory_{this};
|
|
};
|
|
|
|
} // namespace electron
|
|
|
|
#endif // ELECTRON_SHELL_BROWSER_UI_TRAY_ICON_COCOA_H_
|