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

Unified Diff: content/browser/webui/web_ui.h

Issue 8889041: first cut at uber page (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 9 years 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/webui/web_ui.h
diff --git a/content/browser/webui/web_ui.h b/content/browser/webui/web_ui.h
index 5cba59f159833195a5407c7f92c9661ca1604b46..449515772c2fe86ea7273ead2cec2b2906816496 100644
--- a/content/browser/webui/web_ui.h
+++ b/content/browser/webui/web_ui.h
@@ -118,28 +118,32 @@ class CONTENT_EXPORT WebUI : public IPC::Channel::Listener {
register_callback_overwrites_ = value;
}
+ void set_frame_xpath(const std::string& xpath) {
+ frame_xpath_ = xpath;
+ }
+
// Call a Javascript function by sending its name and arguments down to
// the renderer. This is asynchronous; there's no way to get the result
// of the call, and should be thought of more like sending a message to
// the page.
// All function names in WebUI must consist of only ASCII characters.
// There are variants for calls with more arguments.
- void CallJavascriptFunction(const std::string& function_name);
- void CallJavascriptFunction(const std::string& function_name,
+ virtual void CallJavascriptFunction(const std::string& function_name);
+ virtual void CallJavascriptFunction(const std::string& function_name,
const base::Value& arg);
- void CallJavascriptFunction(const std::string& function_name,
+ virtual void CallJavascriptFunction(const std::string& function_name,
const base::Value& arg1,
const base::Value& arg2);
- void CallJavascriptFunction(const std::string& function_name,
+ virtual void CallJavascriptFunction(const std::string& function_name,
const base::Value& arg1,
const base::Value& arg2,
const base::Value& arg3);
- void CallJavascriptFunction(const std::string& function_name,
+ virtual void CallJavascriptFunction(const std::string& function_name,
const base::Value& arg1,
const base::Value& arg2,
const base::Value& arg3,
const base::Value& arg4);
- void CallJavascriptFunction(const std::string& function_name,
+ virtual void CallJavascriptFunction(const std::string& function_name,
const std::vector<const base::Value*>& args);
TabContents* tab_contents() const { return tab_contents_; }
@@ -190,6 +194,10 @@ class CONTENT_EXPORT WebUI : public IPC::Channel::Listener {
typedef std::map<std::string, MessageCallback> MessageCallbackMap;
MessageCallbackMap message_callbacks_;
+ // The path for the iframe this WebUI is embedded in (empty if not in an
+ // iframe).
+ std::string frame_xpath_;
+
DISALLOW_COPY_AND_ASSIGN(WebUI);
};

Powered by Google App Engine
This is Rietveld 408576698