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

Side by Side Diff: content/renderer/web_ui_extension_data.h

Issue 10873038: Replacing WebUIBindings use of CPPBoundClass with v8::Extension. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Ensure WebUIBinding variables are available in all frames. Created 8 years, 1 month 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
« no previous file with comments | « content/renderer/web_ui_extension.cc ('k') | content/renderer/web_ui_extension_data.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_RENDERER_EXTENSIONS_WEBUI_EXTENSION_DATA_H_
6 #define CONTENT_RENDERER_EXTENSIONS_WEBUI_EXTENSION_DATA_H_
7
8 #include <map>
9 #include <string>
10
11 #include "base/basictypes.h"
12 #include "base/string16.h"
13 #include "content/public/renderer/render_view_observer.h"
14 #include "content/public/renderer/render_view_observer_tracker.h"
15
16 namespace content {
17
18 class WebUIExtensionData
19 : public RenderViewObserver,
20 public RenderViewObserverTracker<WebUIExtensionData> {
21 public:
22 explicit WebUIExtensionData(RenderView* render_view);
23 virtual ~WebUIExtensionData();
24
25 // Returns value for a given |key|. Will return an empty string if no such key
26 // exists in the |variable_map_|.
27 string16 GetValue(const string16& key) const;
28
29 private:
30 // RenderViewObserver implementation.
31 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
32
33 void OnSetWebUIProperty(const std::string& name, const std::string& value);
34
35 std::map<string16, string16> variable_map_;
Evan Stade 2012/11/07 00:33:54 why is this UTF16 instead of UTF8? seems v8 can ac
Shishir 2012/11/07 01:53:30 Changed to utf8. The V8 string objects seem string
36
37 DISALLOW_COPY_AND_ASSIGN(WebUIExtensionData);
38 };
39
40 } // namespace content
41
42 #endif // CONTENT_RENDERER_EXTENSIONS_WEBUI_EXTENSION_DATA_H_
OLDNEW
« no previous file with comments | « content/renderer/web_ui_extension.cc ('k') | content/renderer/web_ui_extension_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698