summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authordgozman@chromium.org <dgozman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-04 14:58:22 +0000
committerdgozman@chromium.org <dgozman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-04 14:58:22 +0000
commita131afc860e6d841a100878eca59835a751c97c4 (patch)
tree3f63853ed43b651a31f146d0a0efdc173bfa5be2 /content
parenta76945c1bc3d4e46ca066d88c2c092b8b6925ff6 (diff)
downloadchromium_src-a131afc860e6d841a100878eca59835a751c97c4.zip
chromium_src-a131afc860e6d841a100878eca59835a751c97c4.tar.gz
chromium_src-a131afc860e6d841a100878eca59835a751c97c4.tar.bz2
[DevTools] Added ChangeAttachedWindowHeight method to allow DevTools to change it's window height from inside.
BUG=171410 TEST=manual. Review URL: https://chromiumcodereview.appspot.com/12049014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180406 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/devtools/devtools_frontend_host.cc6
-rw-r--r--content/browser/devtools/devtools_frontend_host.h1
-rw-r--r--content/common/devtools_messages.h4
-rw-r--r--content/public/browser/devtools_frontend_host_delegate.h5
-rw-r--r--content/renderer/devtools/devtools_client.cc4
-rw-r--r--content/renderer/devtools/devtools_client.h1
-rw-r--r--content/shell/shell_devtools_frontend.h1
7 files changed, 21 insertions, 1 deletions
diff --git a/content/browser/devtools/devtools_frontend_host.cc b/content/browser/devtools/devtools_frontend_host.cc
index 4e8966b..754cc27 100644
--- a/content/browser/devtools/devtools_frontend_host.cc
+++ b/content/browser/devtools/devtools_frontend_host.cc
@@ -62,6 +62,8 @@ bool DevToolsFrontendHost::OnMessageReceived(
IPC_MESSAGE_HANDLER(DevToolsAgentMsg_DispatchOnInspectorBackend,
OnDispatchOnInspectorBackend)
IPC_MESSAGE_HANDLER(DevToolsHostMsg_ActivateWindow, OnActivateWindow)
+ IPC_MESSAGE_HANDLER(DevToolsHostMsg_ChangeAttachedWindowHeight,
+ OnChangeAttachedWindowHeight)
IPC_MESSAGE_HANDLER(DevToolsHostMsg_CloseWindow, OnCloseWindow)
IPC_MESSAGE_HANDLER(DevToolsHostMsg_MoveWindow, OnMoveWindow)
IPC_MESSAGE_HANDLER(DevToolsHostMsg_RequestSetDockSide,
@@ -88,6 +90,10 @@ void DevToolsFrontendHost::OnActivateWindow() {
delegate_->ActivateWindow();
}
+void DevToolsFrontendHost::OnChangeAttachedWindowHeight(unsigned height) {
+ delegate_->ChangeAttachedWindowHeight(height);
+}
+
void DevToolsFrontendHost::OnCloseWindow() {
delegate_->CloseWindow();
}
diff --git a/content/browser/devtools/devtools_frontend_host.h b/content/browser/devtools/devtools_frontend_host.h
index 87c6924..5c4924d 100644
--- a/content/browser/devtools/devtools_frontend_host.h
+++ b/content/browser/devtools/devtools_frontend_host.h
@@ -40,6 +40,7 @@ class DevToolsFrontendHost : public DevToolsClientHost,
void OnDispatchOnInspectorBackend(const std::string& message);
void OnActivateWindow();
+ void OnChangeAttachedWindowHeight(unsigned height);
void OnCloseWindow();
void OnMoveWindow(int x, int y);
void OnRequestSetDockSide(const std::string& side);
diff --git a/content/common/devtools_messages.h b/content/common/devtools_messages.h
index 8033300..84a4686 100644
--- a/content/common/devtools_messages.h
+++ b/content/common/devtools_messages.h
@@ -110,6 +110,10 @@ IPC_MESSAGE_ROUTED0(DevToolsMsg_SetupDevToolsClient)
// Activates (brings to the front) corresponding dev tools window.
IPC_MESSAGE_ROUTED0(DevToolsHostMsg_ActivateWindow)
+// Sets the height of corresponding dev tools window.
+IPC_MESSAGE_ROUTED1(DevToolsHostMsg_ChangeAttachedWindowHeight,
+ unsigned /* height */)
+
// Closes dev tools window that is inspecting current render_view_host.
IPC_MESSAGE_ROUTED0(DevToolsHostMsg_CloseWindow)
diff --git a/content/public/browser/devtools_frontend_host_delegate.h b/content/public/browser/devtools_frontend_host_delegate.h
index b0617d2..22bdcc3 100644
--- a/content/public/browser/devtools_frontend_host_delegate.h
+++ b/content/public/browser/devtools_frontend_host_delegate.h
@@ -19,10 +19,13 @@ class DevToolsFrontendHostDelegate {
// Should bring DevTools window to front.
virtual void ActivateWindow() = 0;
+ // Changes the height of attached DevTools window.
+ virtual void ChangeAttachedWindowHeight(unsigned height) = 0;
+
// Closes DevTools front-end window.
virtual void CloseWindow() = 0;
- // Moves DevTols front-end windo.
+ // Moves DevTools front-end window.
virtual void MoveWindow(int x, int y) = 0;
// Specifies side for devtools to dock to.
diff --git a/content/renderer/devtools/devtools_client.cc b/content/renderer/devtools/devtools_client.cc
index eda56f8..7ec522c 100644
--- a/content/renderer/devtools/devtools_client.cc
+++ b/content/renderer/devtools/devtools_client.cc
@@ -62,6 +62,10 @@ void DevToolsClient::activateWindow() {
Send(new DevToolsHostMsg_ActivateWindow(routing_id()));
}
+void DevToolsClient::changeAttachedWindowHeight(unsigned height) {
+ Send(new DevToolsHostMsg_ChangeAttachedWindowHeight(routing_id(), height));
+}
+
void DevToolsClient::closeWindow() {
Send(new DevToolsHostMsg_CloseWindow(routing_id()));
}
diff --git a/content/renderer/devtools/devtools_client.h b/content/renderer/devtools/devtools_client.h
index d2363b4..d2fe7ec 100644
--- a/content/renderer/devtools/devtools_client.h
+++ b/content/renderer/devtools/devtools_client.h
@@ -43,6 +43,7 @@ class CONTENT_EXPORT DevToolsClient
virtual void sendMessageToBackend(const WebKit::WebString&) OVERRIDE;
virtual void activateWindow() OVERRIDE;
+ virtual void changeAttachedWindowHeight(unsigned height) OVERRIDE;
virtual void closeWindow() OVERRIDE;
virtual void moveWindowBy(const WebKit::WebFloatPoint& offset) OVERRIDE;
virtual void requestSetDockSide(const WebKit::WebString& side) OVERRIDE;
diff --git a/content/shell/shell_devtools_frontend.h b/content/shell/shell_devtools_frontend.h
index ca1cae7..2308aa3 100644
--- a/content/shell/shell_devtools_frontend.h
+++ b/content/shell/shell_devtools_frontend.h
@@ -37,6 +37,7 @@ class ShellDevToolsFrontend : public WebContentsObserver,
// DevToolsFrontendHostDelegate implementation
virtual void ActivateWindow() OVERRIDE {}
+ virtual void ChangeAttachedWindowHeight(unsigned height) OVERRIDE {}
virtual void CloseWindow() OVERRIDE {}
virtual void MoveWindow(int x, int y) OVERRIDE {}
virtual void SetDockSide(const std::string& side) OVERRIDE {}