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

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

Issue 7322004: DevTools: devtools manager should know nothing about DevToolsWindow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed Created 9 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 | 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 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 12
13 namespace IPC { 13 namespace IPC {
14 class Message; 14 class Message;
15 } 15 }
16 16
17 class DevToolsWindow;
18 class TabContentsWrapper; 17 class TabContentsWrapper;
19 18
20 // Describes interface for managing devtools clients from browser process. There 19 // Describes interface for managing devtools clients from browser process. There
21 // are currently two types of clients: devtools windows and TCP socket 20 // are currently two types of clients: devtools windows and TCP socket
22 // debuggers. 21 // debuggers.
23 class DevToolsClientHost { 22 class DevToolsClientHost {
24 public: 23 public:
25 class CloseListener { 24 class CloseListener {
26 public: 25 public:
27 CloseListener() {} 26 CloseListener() {}
(...skipping 13 matching lines...) Expand all
41 // navigating to |url|. 40 // navigating to |url|.
42 virtual void FrameNavigating(const std::string& url) = 0; 41 virtual void FrameNavigating(const std::string& url) = 0;
43 42
44 // Sends the message to the devtools client hosted by this object. 43 // Sends the message to the devtools client hosted by this object.
45 virtual void SendMessageToClient(const IPC::Message& msg) = 0; 44 virtual void SendMessageToClient(const IPC::Message& msg) = 0;
46 45
47 void set_close_listener(CloseListener* listener) { 46 void set_close_listener(CloseListener* listener) {
48 close_listener_ = listener; 47 close_listener_ = listener;
49 } 48 }
50 49
51 virtual DevToolsWindow* AsDevToolsWindow();
52
53 // Invoked when a tab is replaced by another tab. This is triggered by 50 // Invoked when a tab is replaced by another tab. This is triggered by
54 // TabStripModel::ReplaceTabContentsAt. 51 // TabStripModel::ReplaceTabContentsAt.
55 virtual void TabReplaced(TabContentsWrapper* new_tab) = 0; 52 virtual void TabReplaced(TabContentsWrapper* new_tab) = 0;
56 53
57 protected: 54 protected:
58 DevToolsClientHost() : close_listener_(NULL) {} 55 DevToolsClientHost() : close_listener_(NULL) {}
59 56
60 // Should be called when the devtools client is going to die and this 57 // Should be called when the devtools client is going to die and this
61 // DevToolsClientHost should not be used anymore. 58 // DevToolsClientHost should not be used anymore.
62 void NotifyCloseListener(); 59 void NotifyCloseListener();
63 60
64 private: 61 private:
65 CloseListener* close_listener_; 62 CloseListener* close_listener_;
66 DISALLOW_COPY_AND_ASSIGN(DevToolsClientHost); 63 DISALLOW_COPY_AND_ASSIGN(DevToolsClientHost);
67 }; 64 };
68 65
69 #endif // CONTENT_BROWSER_DEBUGGER_DEVTOOLS_CLIENT_HOST_H_ 66 #endif // CONTENT_BROWSER_DEBUGGER_DEVTOOLS_CLIENT_HOST_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/extension_settings_handler.cc ('k') | content/browser/debugger/devtools_client_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698