Chromium Code Reviews| Index: content/browser/webui/web_ui_impl.h |
| diff --git a/content/browser/webui/web_ui_impl.h b/content/browser/webui/web_ui_impl.h |
| index 2f3c1eff89d68ad8ae4e3f6d90a89a50a1ecf207..3b714d2aacf2b404edb4de40209db36b95f17786 100644 |
| --- a/content/browser/webui/web_ui_impl.h |
| +++ b/content/browser/webui/web_ui_impl.h |
| @@ -83,6 +83,8 @@ class CONTENT_EXPORT WebUIImpl : public WebUI, |
| bool OnMessageReceived(const IPC::Message& message) override; |
| private: |
| + class MainFrameNavigationObserver; |
| + |
| // IPC message handling. |
| void OnWebUISend(const GURL& source_url, |
| const std::string& message, |
| @@ -101,6 +103,9 @@ class CONTENT_EXPORT WebUIImpl : public WebUI, |
| void AddToSetIfFrameNameMatches(std::set<RenderFrameHost*>* frame_set, |
| RenderFrameHost* host); |
| + // Called internally and by the owned MainFrameNavigationObserver. |
| + void DisallowJavascriptOnAllHandlers(); |
| + |
| // A map of message name -> message handling callback. |
| typedef std::map<std::string, MessageCallback> MessageCallbackMap; |
| MessageCallbackMap message_callbacks_; |
| @@ -118,6 +123,9 @@ class CONTENT_EXPORT WebUIImpl : public WebUI, |
| // Non-owning pointer to the WebContents this WebUI is associated with. |
| WebContents* web_contents_; |
| + // Used to allow WebUI to be notified of WebContents navigations. |
|
Charlie Reis
2016/06/24 23:15:01
// Notifies this WebUI about notifications in the
tommycli
2016/06/24 23:55:36
Done.
|
| + std::unique_ptr<MainFrameNavigationObserver> web_contents_observer_; |
| + |
| // The name of the frame this WebUI is embedded in. If empty, the main frame |
| // is used. |
| const std::string frame_name_; |