| OLD | NEW |
| 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 2302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2313 int height = devtools_window_->dock_side() == DEVTOOLS_DOCK_SIDE_MINIMIZED ? | 2313 int height = devtools_window_->dock_side() == DEVTOOLS_DOCK_SIDE_MINIMIZED ? |
| 2314 devtools_window_->GetMinimizedHeight() : | 2314 devtools_window_->GetMinimizedHeight() : |
| 2315 devtools_window_->GetHeight(contents_split_->height()); | 2315 devtools_window_->GetHeight(contents_split_->height()); |
| 2316 int split_offset = contents_split_->height() - split_size - height; | 2316 int split_offset = contents_split_->height() - split_size - height; |
| 2317 contents_split_->set_divider_offset(split_offset); | 2317 contents_split_->set_divider_offset(split_offset); |
| 2318 } | 2318 } |
| 2319 } | 2319 } |
| 2320 | 2320 |
| 2321 void BrowserView::UpdateUIForContents(WebContents* contents) { | 2321 void BrowserView::UpdateUIForContents(WebContents* contents) { |
| 2322 bool needs_layout = MaybeShowBookmarkBar(contents); | 2322 bool needs_layout = MaybeShowBookmarkBar(contents); |
| 2323 // TODO(jamescook): This function always returns true. Remove it and figure |
| 2324 // out when layout is actually required. |
| 2323 needs_layout |= MaybeShowInfoBar(contents); | 2325 needs_layout |= MaybeShowInfoBar(contents); |
| 2324 if (needs_layout) | 2326 if (needs_layout) |
| 2325 Layout(); | 2327 Layout(); |
| 2326 } | 2328 } |
| 2327 | 2329 |
| 2328 void BrowserView::ProcessFullscreen(bool fullscreen, | 2330 void BrowserView::ProcessFullscreen(bool fullscreen, |
| 2329 FullscreenType type, | 2331 FullscreenType type, |
| 2330 const GURL& url, | 2332 const GURL& url, |
| 2331 FullscreenExitBubbleType bubble_type) { | 2333 FullscreenExitBubbleType bubble_type) { |
| 2332 // Reduce jankiness during the following position changes by: | 2334 // Reduce jankiness during the following position changes by: |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2721 | 2723 |
| 2722 Browser* modal_browser = | 2724 Browser* modal_browser = |
| 2723 chrome::FindBrowserWithWebContents(active_dialog->web_contents()); | 2725 chrome::FindBrowserWithWebContents(active_dialog->web_contents()); |
| 2724 if (modal_browser && (browser_ != modal_browser)) { | 2726 if (modal_browser && (browser_ != modal_browser)) { |
| 2725 modal_browser->window()->FlashFrame(true); | 2727 modal_browser->window()->FlashFrame(true); |
| 2726 modal_browser->window()->Activate(); | 2728 modal_browser->window()->Activate(); |
| 2727 } | 2729 } |
| 2728 | 2730 |
| 2729 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); | 2731 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); |
| 2730 } | 2732 } |
| OLD | NEW |