Update for changes to devtools in Chrome 31

browser/devtools_embedder_message_dispatcher.* came from
chrome/browser/devtools, and were modified just enough to compile within
brightray.
This commit is contained in:
Adam Roben 2013-12-02 12:38:24 -05:00
parent 1da8c37098
commit 265076f19a
5 changed files with 297 additions and 6 deletions

View file

@ -61,6 +61,9 @@ content::WebContents* InspectableWebContentsImpl::GetWebContents() const {
void InspectableWebContentsImpl::ShowDevTools() {
if (!devtools_web_contents_) {
embedder_message_dispatcher_.reset(
new DevToolsEmbedderMessageDispatcher(this));
auto create_params = content::WebContents::CreateParams(
web_contents_->GetBrowserContext());
devtools_web_contents_.reset(content::WebContents::Create(create_params));
@ -103,9 +106,6 @@ void InspectableWebContentsImpl::UpdateFrontendDockSide() {
void InspectableWebContentsImpl::ActivateWindow() {
}
void InspectableWebContentsImpl::ChangeAttachedWindowHeight(unsigned height) {
}
void InspectableWebContentsImpl::CloseWindow() {
view_->CloseDevTools();
devtools_web_contents_.reset();
@ -162,6 +162,11 @@ void InspectableWebContentsImpl::SearchInPath(
const std::string& query) {
}
void InspectableWebContentsImpl::DispatchOnEmbedder(
const std::string& message) {
embedder_message_dispatcher_->Dispatch(message);
}
void InspectableWebContentsImpl::InspectedContentsClosing() {
}