2020-10-27 21:28:43 +00:00
|
|
|
// Copyright (c) 2020 Microsoft, Inc.
|
|
|
|
// Use of this source code is governed by the MIT license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2021-11-22 07:34:31 +00:00
|
|
|
#ifndef ELECTRON_SHELL_BROWSER_EXTENDED_WEB_CONTENTS_OBSERVER_H_
|
|
|
|
#define ELECTRON_SHELL_BROWSER_EXTENDED_WEB_CONTENTS_OBSERVER_H_
|
2020-10-27 21:28:43 +00:00
|
|
|
|
2021-06-01 01:34:44 +00:00
|
|
|
#include <string>
|
2020-10-27 21:28:43 +00:00
|
|
|
|
2024-07-29 17:42:57 +00:00
|
|
|
#include "base/observer_list_types.h"
|
2024-07-22 09:31:32 +00:00
|
|
|
|
|
|
|
namespace gfx {
|
|
|
|
class Rect;
|
|
|
|
}
|
2020-10-27 21:28:43 +00:00
|
|
|
|
|
|
|
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 OnSetContentBounds(const gfx::Rect& rect) {}
|
|
|
|
virtual void OnActivateContents() {}
|
2021-03-16 16:18:45 +00:00
|
|
|
virtual void OnPageTitleUpdated(const std::u16string& title,
|
2020-10-27 21:28:43 +00:00
|
|
|
bool explicit_set) {}
|
2020-11-09 21:54:04 +00:00
|
|
|
virtual void OnDevToolsResized() {}
|
2020-10-27 21:28:43 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
~ExtendedWebContentsObserver() override {}
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace electron
|
|
|
|
|
2021-11-22 07:34:31 +00:00
|
|
|
#endif // ELECTRON_SHELL_BROWSER_EXTENDED_WEB_CONTENTS_OBSERVER_H_
|