2011-01-25 19:37:27 +01:00
|
|
|
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef _BROWSER_DEVTOOLS_CLIENT_H
|
|
|
|
#define _BROWSER_DEVTOOLS_CLIENT_H
|
|
|
|
|
2011-09-23 02:16:03 +02:00
|
|
|
#include "base/memory/scoped_ptr.h"
|
2011-10-12 21:09:15 +02:00
|
|
|
#include "base/memory/weak_ptr.h"
|
2011-01-25 19:37:27 +01:00
|
|
|
#include "base/task.h"
|
|
|
|
|
2011-02-15 19:07:24 +01:00
|
|
|
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsFrontendClient.h"
|
2011-01-25 19:37:27 +01:00
|
|
|
|
|
|
|
namespace WebKit {
|
|
|
|
|
|
|
|
class WebDevToolsFrontend;
|
|
|
|
|
|
|
|
} // namespace WebKit
|
|
|
|
|
|
|
|
class BrowserDevToolsCallArgs;
|
|
|
|
class BrowserDevToolsAgent;
|
|
|
|
class CefBrowserImpl;
|
|
|
|
|
|
|
|
class BrowserDevToolsClient: public WebKit::WebDevToolsFrontendClient {
|
|
|
|
|
|
|
|
public:
|
|
|
|
BrowserDevToolsClient(CefBrowserImpl* browser,
|
|
|
|
BrowserDevToolsAgent* agent);
|
|
|
|
virtual ~BrowserDevToolsClient();
|
|
|
|
|
|
|
|
// WebDevToolsFrontendClient implementation
|
|
|
|
virtual void sendFrontendLoaded();
|
|
|
|
virtual void sendMessageToBackend(const WebKit::WebString& data);
|
|
|
|
virtual void sendDebuggerCommandToAgent(const WebKit::WebString& command);
|
|
|
|
|
|
|
|
virtual void activateWindow();
|
|
|
|
virtual void closeWindow();
|
|
|
|
virtual void dockWindow();
|
|
|
|
virtual void undockWindow();
|
|
|
|
|
|
|
|
void AsyncCall(const BrowserDevToolsCallArgs& args);
|
|
|
|
|
|
|
|
void all_messages_processed();
|
|
|
|
|
|
|
|
CefBrowserImpl* browser() { return browser_; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
void Call(const BrowserDevToolsCallArgs& args);
|
|
|
|
|
2011-10-12 21:09:15 +02:00
|
|
|
base::WeakPtrFactory<BrowserDevToolsClient> weak_factory_;
|
2011-01-25 19:37:27 +01:00
|
|
|
CefBrowserImpl* browser_;
|
|
|
|
BrowserDevToolsAgent* dev_tools_agent_;
|
|
|
|
WebKit::WebView* web_view_;
|
|
|
|
scoped_ptr<WebKit::WebDevToolsFrontend> web_tools_frontend_;
|
|
|
|
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(BrowserDevToolsClient);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _BROWSER_DEVTOOLS_CLIENT_H
|