REVIEW: Inject devtools extensions API via browser
Behavior was changed in https://crbug.com/706169
This commit is contained in:
parent
531472bad4
commit
7a9892f151
4 changed files with 59 additions and 10 deletions
|
@ -113,6 +113,8 @@ class InspectableWebContentsImpl :
|
|||
const std::string& value) override;
|
||||
void RemovePreference(const std::string& name) override;
|
||||
void ClearPreferences() override;
|
||||
void RegisterExtensionsAPI(const std::string& origin,
|
||||
const std::string& script) override;
|
||||
|
||||
// content::DevToolsFrontendHostDelegate:
|
||||
void HandleMessageFromDevToolsFrontend(const std::string& message);
|
||||
|
@ -129,9 +131,10 @@ class InspectableWebContentsImpl :
|
|||
void WebContentsDestroyed() override;
|
||||
void OnWebContentsFocused(
|
||||
content::RenderWidgetHost* render_widget_host) override;
|
||||
void DidStartNavigationToPendingEntry(
|
||||
const GURL& url,
|
||||
content::ReloadType reload_type) override;
|
||||
void ReadyToCommitNavigation(
|
||||
content::NavigationHandle* navigation_handle) override;
|
||||
void DidFinishNavigation(
|
||||
content::NavigationHandle* navigation_handle) override;
|
||||
|
||||
// content::WebContentsDelegate:
|
||||
bool DidAddMessageToConsole(content::WebContents* source,
|
||||
|
@ -192,6 +195,9 @@ class InspectableWebContentsImpl :
|
|||
std::unique_ptr<content::WebContents> devtools_web_contents_;
|
||||
std::unique_ptr<InspectableWebContentsView> view_;
|
||||
|
||||
using ExtensionsAPIs = std::map<std::string, std::string>;
|
||||
ExtensionsAPIs extensions_api_;
|
||||
|
||||
base::WeakPtrFactory<InspectableWebContentsImpl> weak_factory_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(InspectableWebContentsImpl);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue