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

Side by Side Diff: chrome/browser/dom_ui/dom_ui.h

Issue 21540: Add developer tools message forwarding to browser (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/dom_ui/dev_tools_ui.cc ('k') | chrome/browser/dom_ui/dom_ui_contents.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 CHROME_BROWSER_DOM_UI_H__ 5 #ifndef CHROME_BROWSER_DOM_UI_H__
6 #define CHROME_BROWSER_DOM_UI_H__ 6 #define CHROME_BROWSER_DOM_UI_H__
7 7
8 #include "base/task.h" 8 #include "base/task.h"
9 #include "chrome/browser/dom_ui/dom_ui_contents.h" 9 #include "chrome/browser/dom_ui/dom_ui_contents.h"
10 10
11 class DictionaryValue; 11 class DictionaryValue;
12 class DOMMessageHandler; 12 class DOMMessageHandler;
13 class RenderViewHost;
13 class Value; 14 class Value;
14 15
15 // A DOMUI sets up the datasources and message handlers for a given HTML-based 16 // A DOMUI sets up the datasources and message handlers for a given HTML-based
16 // UI. It is contained by a DOMUIContents. 17 // UI. It is contained by a DOMUIContents.
17 class DOMUI { 18 class DOMUI {
18 public: 19 public:
19 DOMUI(DOMUIContents* contents); 20 DOMUI(DOMUIContents* contents);
20 21
21 virtual ~DOMUI(); 22 virtual ~DOMUI();
22 virtual void Init() = 0; 23 virtual void Init() = 0;
23 24
25 virtual void RenderViewCreated(RenderViewHost* render_view_host) {}
26
24 // Called from DOMUIContents. 27 // Called from DOMUIContents.
25 void ProcessDOMUIMessage(const std::string& message, 28 void ProcessDOMUIMessage(const std::string& message,
26 const std::string& content); 29 const std::string& content);
27 30
28 // Used by DOMMessageHandlers. 31 // Used by DOMMessageHandlers.
29 typedef Callback1<const Value*>::Type MessageCallback; 32 typedef Callback1<const Value*>::Type MessageCallback;
30 void RegisterMessageCallback (const std::string& message, 33 void RegisterMessageCallback (const std::string& message,
31 MessageCallback* callback); 34 MessageCallback* callback);
32 35
33 // Call a Javascript function by sending its name and arguments down to 36 // Call a Javascript function by sending its name and arguments down to
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 // Extract a string value from a Value. 101 // Extract a string value from a Value.
99 std::wstring ExtractStringValue(const Value* value); 102 std::wstring ExtractStringValue(const Value* value);
100 103
101 DOMUI* const dom_ui_; 104 DOMUI* const dom_ui_;
102 105
103 private: 106 private:
104 DISALLOW_COPY_AND_ASSIGN(DOMMessageHandler); 107 DISALLOW_COPY_AND_ASSIGN(DOMMessageHandler);
105 }; 108 };
106 109
107 #endif // CHROME_BROWSER_DOM_UI_H__ 110 #endif // CHROME_BROWSER_DOM_UI_H__
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/dev_tools_ui.cc ('k') | chrome/browser/dom_ui/dom_ui_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698