2014-10-31 11:17:05 -07:00
|
|
|
// Copyright (c) 2013 GitHub, Inc.
|
2014-04-25 17:49:37 +08:00
|
|
|
// Use of this source code is governed by the MIT license that can be
|
2013-04-12 09:46:58 +08:00
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2014-03-16 08:58:59 +08:00
|
|
|
#ifndef ATOM_RENDERER_ATOM_RENDER_VIEW_OBSERVER_H_
|
|
|
|
#define ATOM_RENDERER_ATOM_RENDER_VIEW_OBSERVER_H_
|
2013-04-12 09:46:58 +08:00
|
|
|
|
|
|
|
#include "content/public/renderer/render_view_observer.h"
|
2013-04-23 12:18:07 +08:00
|
|
|
|
2013-04-12 09:46:58 +08:00
|
|
|
namespace atom {
|
|
|
|
|
2013-12-23 22:08:45 +08:00
|
|
|
class AtomRenderViewObserver : public content::RenderViewObserver {
|
2013-04-12 23:16:16 +08:00
|
|
|
public:
|
2018-03-09 15:01:09 +05:30
|
|
|
explicit AtomRenderViewObserver(content::RenderView* render_view);
|
2013-04-12 09:46:58 +08:00
|
|
|
|
2013-04-20 14:03:55 +08:00
|
|
|
protected:
|
2018-04-17 16:03:51 -07:00
|
|
|
~AtomRenderViewObserver() override;
|
2013-04-12 09:46:58 +08:00
|
|
|
|
2013-04-20 14:03:55 +08:00
|
|
|
private:
|
2018-03-09 15:01:09 +05:30
|
|
|
// content::RenderViewObserver implementation.
|
|
|
|
bool OnMessageReceived(const IPC::Message& message) override;
|
2016-09-06 17:24:37 +09:00
|
|
|
void OnDestruct() override;
|
2013-04-23 12:18:07 +08:00
|
|
|
|
2018-03-09 15:01:09 +05:30
|
|
|
void OnOffscreen();
|
|
|
|
|
2013-04-12 09:46:58 +08:00
|
|
|
DISALLOW_COPY_AND_ASSIGN(AtomRenderViewObserver);
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace atom
|
|
|
|
|
2014-03-16 08:58:59 +08:00
|
|
|
#endif // ATOM_RENDERER_ATOM_RENDER_VIEW_OBSERVER_H_
|