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

Side by Side Diff: content/browser/debugger/devtools_client_host.h

Issue 8636010: Revert "DevTools: remove obsolete methods from DevToolsClientHost" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_BROWSER_DEBUGGER_DEVTOOLS_CLIENT_HOST_H_ 5 #ifndef CONTENT_BROWSER_DEBUGGER_DEVTOOLS_CLIENT_HOST_H_
6 #define CONTENT_BROWSER_DEBUGGER_DEVTOOLS_CLIENT_HOST_H_ 6 #define CONTENT_BROWSER_DEBUGGER_DEVTOOLS_CLIENT_HOST_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector>
10 11
11 #include "base/basictypes.h" 12 #include "base/basictypes.h"
12 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
13 14
14 namespace IPC { 15 namespace IPC {
15 class Message; 16 class Message;
16 } 17 }
17 18
19 class RenderViewHost;
18 class TabContents; 20 class TabContents;
19 21
20 // Describes interface for managing devtools clients from browser process. There 22 // Describes interface for managing devtools clients from browser process. There
21 // are currently two types of clients: devtools windows and TCP socket 23 // are currently two types of clients: devtools windows and TCP socket
22 // debuggers. 24 // debuggers.
23 class CONTENT_EXPORT DevToolsClientHost { 25 class CONTENT_EXPORT DevToolsClientHost {
24 public: 26 public:
25 class CONTENT_EXPORT CloseListener { 27 class CONTENT_EXPORT CloseListener {
26 public: 28 public:
27 CloseListener() {} 29 CloseListener() {}
28 virtual ~CloseListener() {} 30 virtual ~CloseListener() {}
29 virtual void ClientHostClosing(DevToolsClientHost* host) = 0; 31 virtual void ClientHostClosing(DevToolsClientHost* host) = 0;
30 private: 32 private:
31 DISALLOW_COPY_AND_ASSIGN(CloseListener); 33 DISALLOW_COPY_AND_ASSIGN(CloseListener);
32 }; 34 };
33 35
36 static DevToolsClientHost* FindOwnerClientHost(RenderViewHost* client_rvh);
37
34 virtual ~DevToolsClientHost(); 38 virtual ~DevToolsClientHost();
35 39
36 // This method is called when tab inspected by this devtools client is 40 // This method is called when tab inspected by this devtools client is
37 // closing. 41 // closing.
38 virtual void InspectedTabClosing() = 0; 42 virtual void InspectedTabClosing() = 0;
39 43
40 // This method is called when tab inspected by this devtools client is 44 // This method is called when tab inspected by this devtools client is
41 // navigating to |url|. 45 // navigating to |url|.
42 virtual void FrameNavigating(const std::string& url) = 0; 46 virtual void FrameNavigating(const std::string& url) = 0;
43 47
44 // Sends the message to the devtools client hosted by this object. 48 // Sends the message to the devtools client hosted by this object.
45 virtual void SendMessageToClient(const IPC::Message& msg) = 0; 49 virtual void SendMessageToClient(const IPC::Message& msg) = 0;
46 50
47 void set_close_listener(CloseListener* listener) { 51 void set_close_listener(CloseListener* listener) {
48 close_listener_ = listener; 52 close_listener_ = listener;
49 } 53 }
50 54
51 // Invoked when a tab is replaced by another tab. This is triggered by 55 // Invoked when a tab is replaced by another tab. This is triggered by
52 // TabStripModel::ReplaceTabContentsAt. 56 // TabStripModel::ReplaceTabContentsAt.
53 virtual void TabReplaced(TabContents* new_tab) = 0; 57 virtual void TabReplaced(TabContents* new_tab) = 0;
54 58
59 // Returns client (front-end) RenderViewHost implementation of this
60 // client host if applicable. NULL otherwise.
61 virtual RenderViewHost* GetClientRenderViewHost();
62
55 protected: 63 protected:
56 DevToolsClientHost(); 64 DevToolsClientHost();
57 65
58 void ForwardToDevToolsAgent(const IPC::Message& message); 66 void ForwardToDevToolsAgent(const IPC::Message& message);
59 67
60 // Should be called when the devtools client is going to die and this 68 // Should be called when the devtools client is going to die and this
61 // DevToolsClientHost should not be used anymore. 69 // DevToolsClientHost should not be used anymore.
62 void NotifyCloseListener(); 70 void NotifyCloseListener();
63 71
64 private: 72 private:
65 CloseListener* close_listener_; 73 CloseListener* close_listener_;
66 DISALLOW_COPY_AND_ASSIGN(DevToolsClientHost); 74 DISALLOW_COPY_AND_ASSIGN(DevToolsClientHost);
67 }; 75 };
68 76
69 #endif // CONTENT_BROWSER_DEBUGGER_DEVTOOLS_CLIENT_HOST_H_ 77 #endif // CONTENT_BROWSER_DEBUGGER_DEVTOOLS_CLIENT_HOST_H_
OLDNEW
« no previous file with comments | « chrome/browser/debugger/devtools_window.cc ('k') | content/browser/debugger/devtools_client_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698