electron/shell/browser/extended_web_contents_observer.h
Charles Kerr b9ea4a6ba4 Revert "chore: bump chromium to 91.0.4448.0 (master) (#28009)"
This reverts commit a006cf681b.

It was squash-merged by accident; let's redo that without squashing.
2021-03-30 21:28:40 -05:00

35 lines
1.1 KiB
C++

// Copyright (c) 2020 Microsoft, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef SHELL_BROWSER_EXTENDED_WEB_CONTENTS_OBSERVER_H_
#define SHELL_BROWSER_EXTENDED_WEB_CONTENTS_OBSERVER_H_
#include <vector>
#include "base/observer_list.h"
#include "electron/shell/common/api/api.mojom.h"
#include "ui/gfx/geometry/rect.h"
namespace electron {
// Certain events are only in WebContentsDelegate, so we provide our own
// Observer to dispatch those events.
class ExtendedWebContentsObserver : public base::CheckedObserver {
public:
virtual void OnCloseContents() {}
virtual void OnDraggableRegionsUpdated(
const std::vector<mojom::DraggableRegionPtr>& regions) {}
virtual void OnSetContentBounds(const gfx::Rect& rect) {}
virtual void OnActivateContents() {}
virtual void OnPageTitleUpdated(const std::u16string& title,
bool explicit_set) {}
virtual void OnDevToolsResized() {}
protected:
~ExtendedWebContentsObserver() override {}
};
} // namespace electron
#endif // SHELL_BROWSER_EXTENDED_WEB_CONTENTS_OBSERVER_H_