| Index: chrome/browser/devtools/devtools_window.cc
|
| diff --git a/chrome/browser/devtools/devtools_window.cc b/chrome/browser/devtools/devtools_window.cc
|
| index bcaa20fe4d9159233d204cc44915861c072af119..68146e568d03a1422083b7001a7fd8ee85d37a60 100644
|
| --- a/chrome/browser/devtools/devtools_window.cc
|
| +++ b/chrome/browser/devtools/devtools_window.cc
|
| @@ -498,8 +498,9 @@ content::RenderViewHost* DevToolsWindow::GetRenderViewHost() {
|
| return web_contents_->GetRenderViewHost();
|
| }
|
|
|
| -gfx::Insets DevToolsWindow::GetContentsInsets() const {
|
| - return contents_insets_;
|
| +const DevToolsContentsResizingStrategy&
|
| +DevToolsWindow::GetContentsResizingStrategy() const {
|
| + return contents_resizing_strategy_;
|
| }
|
|
|
| gfx::Size DevToolsWindow::GetMinimumSize() const {
|
| @@ -1003,14 +1004,17 @@ void DevToolsWindow::CloseWindow() {
|
|
|
| void DevToolsWindow::SetContentsInsets(
|
| int top, int left, int bottom, int right) {
|
| - if (contents_insets_.top() == top &&
|
| - contents_insets_.left() == left &&
|
| - contents_insets_.bottom() == bottom &&
|
| - contents_insets_.right() == right) {
|
| + gfx::Insets insets(top, left, bottom, right);
|
| + SetContentsResizingStrategy(insets, contents_resizing_strategy_.min_size());
|
| +}
|
| +
|
| +void DevToolsWindow::SetContentsResizingStrategy(
|
| + const gfx::Insets& insets, const gfx::Size& min_size) {
|
| + DevToolsContentsResizingStrategy strategy(insets, min_size);
|
| + if (contents_resizing_strategy_ == strategy)
|
| return;
|
| - }
|
|
|
| - contents_insets_ = gfx::Insets(top, left, bottom, right);
|
| + contents_resizing_strategy_ = strategy;
|
| if (is_docked_) {
|
| // Update inspected window.
|
| BrowserWindow* inspected_window = GetInspectedBrowserWindow();
|
|
|