feat: preliminary support for //extensions (#17440)
This commit is contained in:
parent
bd526f97a5
commit
95977291f7
54 changed files with 2483 additions and 36 deletions
|
@ -0,0 +1,37 @@
|
|||
// Copyright 2014 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_EXTENSIONS_ATOM_EXTENSION_WEB_CONTENTS_OBSERVER_H_
|
||||
#define SHELL_BROWSER_EXTENSIONS_ATOM_EXTENSION_WEB_CONTENTS_OBSERVER_H_
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "content/public/browser/web_contents_user_data.h"
|
||||
#include "extensions/browser/extension_web_contents_observer.h"
|
||||
|
||||
namespace extensions {
|
||||
|
||||
// The app_shell version of ExtensionWebContentsObserver.
|
||||
class AtomExtensionWebContentsObserver
|
||||
: public ExtensionWebContentsObserver,
|
||||
public content::WebContentsUserData<AtomExtensionWebContentsObserver> {
|
||||
public:
|
||||
~AtomExtensionWebContentsObserver() override;
|
||||
|
||||
// Creates and initializes an instance of this class for the given
|
||||
// |web_contents|, if it doesn't already exist.
|
||||
static void CreateForWebContents(content::WebContents* web_contents);
|
||||
|
||||
private:
|
||||
friend class content::WebContentsUserData<AtomExtensionWebContentsObserver>;
|
||||
|
||||
explicit AtomExtensionWebContentsObserver(content::WebContents* web_contents);
|
||||
|
||||
WEB_CONTENTS_USER_DATA_KEY_DECL();
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AtomExtensionWebContentsObserver);
|
||||
};
|
||||
|
||||
} // namespace extensions
|
||||
|
||||
#endif // SHELL_BROWSER_EXTENSIONS_ATOM_EXTENSION_WEB_CONTENTS_OBSERVER_H_
|
Loading…
Add table
Add a link
Reference in a new issue