Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(302)

Side by Side Diff: content/public/browser/web_ui_message_handler.h

Issue 2099563002: WebUI: DisallowJavascript only on Refresh and non-same-page navigations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: small fixes Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_UI_MESSAGE_HANDLER_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_UI_MESSAGE_HANDLER_H_
6 #define CONTENT_PUBLIC_BROWSER_WEB_UI_MESSAGE_HANDLER_H_ 6 #define CONTENT_PUBLIC_BROWSER_WEB_UI_MESSAGE_HANDLER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 // Sets the attached WebUI - exposed to subclasses for testing purposes. 115 // Sets the attached WebUI - exposed to subclasses for testing purposes.
116 void set_web_ui(WebUI* web_ui) { web_ui_ = web_ui; } 116 void set_web_ui(WebUI* web_ui) { web_ui_ = web_ui; }
117 117
118 private: 118 private:
119 // Provide external classes access to web_ui(), set_web_ui(), and 119 // Provide external classes access to web_ui(), set_web_ui(), and
120 // RenderViewReused. 120 // RenderViewReused.
121 friend class WebUIImpl; 121 friend class WebUIImpl;
122 friend class ::WebUIBrowserTest; 122 friend class ::WebUIBrowserTest;
123 123
124 // Called when a RenderView is reused to display a page (i.e. reload).
125 void RenderViewReused();
126
127 // TODO(dbeam): disallow JavaScript when a renderer process crashes. 124 // TODO(dbeam): disallow JavaScript when a renderer process crashes.
128 // http://crbug.com/610450 125 // http://crbug.com/610450
129 126
130 // True if the page is for JavaScript calls from this handler. 127 // True if the page is for JavaScript calls from this handler.
131 bool javascript_allowed_; 128 bool javascript_allowed_;
132 129
133 WebUI* web_ui_; 130 WebUI* web_ui_;
134 }; 131 };
135 132
136 } // namespace content 133 } // namespace content
137 134
138 #endif // CONTENT_PUBLIC_BROWSER_WEB_UI_MESSAGE_HANDLER_H_ 135 #endif // CONTENT_PUBLIC_BROWSER_WEB_UI_MESSAGE_HANDLER_H_
OLDNEW
« content/browser/webui/web_ui_impl.cc ('K') | « content/browser/webui/web_ui_message_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698