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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 12871013: DevTools: respect minimum width/height when resizing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 9 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
« no previous file with comments | « chrome/browser/ui/gtk/browser_window_gtk.cc ('k') | ui/views/controls/single_split_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 #include "chrome/browser/ui/views/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 2211 matching lines...) Expand 10 before | Expand all | Expand 10 after
2222 } 2222 }
2223 2223
2224 void BrowserView::ShowDevToolsContainer() { 2224 void BrowserView::ShowDevToolsContainer() {
2225 if (!devtools_focus_tracker_.get()) { 2225 if (!devtools_focus_tracker_.get()) {
2226 // Install devtools focus tracker when dev tools window is shown for the 2226 // Install devtools focus tracker when dev tools window is shown for the
2227 // first time. 2227 // first time.
2228 devtools_focus_tracker_.reset( 2228 devtools_focus_tracker_.reset(
2229 new views::ExternalFocusTracker(devtools_container_, 2229 new views::ExternalFocusTracker(devtools_container_,
2230 GetFocusManager())); 2230 GetFocusManager()));
2231 } 2231 }
2232
2233 gfx::Size min_devtools_size(devtools_window_->GetMinimumWidth(),
2234 devtools_window_->GetMinimumHeight());
2235 devtools_container_->SetPreferredSize(min_devtools_size);
2236
2232 devtools_container_->SetVisible(true); 2237 devtools_container_->SetVisible(true);
2233 devtools_dock_side_ = devtools_window_->dock_side(); 2238 devtools_dock_side_ = devtools_window_->dock_side();
2234 bool dock_to_right = devtools_dock_side_ == DEVTOOLS_DOCK_SIDE_RIGHT; 2239 bool dock_to_right = devtools_dock_side_ == DEVTOOLS_DOCK_SIDE_RIGHT;
2235 contents_split_->set_orientation( 2240 contents_split_->set_orientation(
2236 dock_to_right ? views::SingleSplitView::HORIZONTAL_SPLIT 2241 dock_to_right ? views::SingleSplitView::HORIZONTAL_SPLIT
2237 : views::SingleSplitView::VERTICAL_SPLIT); 2242 : views::SingleSplitView::VERTICAL_SPLIT);
2238 UpdateDevToolsSplitPosition(); 2243 UpdateDevToolsSplitPosition();
2239 contents_split_->InvalidateLayout(); 2244 contents_split_->InvalidateLayout();
2240 Layout(); 2245 Layout();
2241 } 2246 }
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
2710 2715
2711 Browser* modal_browser = 2716 Browser* modal_browser =
2712 chrome::FindBrowserWithWebContents(active_dialog->web_contents()); 2717 chrome::FindBrowserWithWebContents(active_dialog->web_contents());
2713 if (modal_browser && (browser_ != modal_browser)) { 2718 if (modal_browser && (browser_ != modal_browser)) {
2714 modal_browser->window()->FlashFrame(true); 2719 modal_browser->window()->FlashFrame(true);
2715 modal_browser->window()->Activate(); 2720 modal_browser->window()->Activate();
2716 } 2721 }
2717 2722
2718 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); 2723 AppModalDialogQueue::GetInstance()->ActivateModalDialog();
2719 } 2724 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/browser_window_gtk.cc ('k') | ui/views/controls/single_split_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698