Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_frame_aura.h" | 5 #include "chrome/browser/ui/views/frame/browser_frame_aura.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "chrome/app/chrome_command_ids.h" | 8 #include "chrome/app/chrome_command_ids.h" |
| 9 #include "chrome/browser/ui/views/frame/browser_view.h" | 9 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 10 #include "chrome/browser/ui/views/frame/system_menu_model_delegate.h" | 10 #include "chrome/browser/ui/views/frame/system_menu_model_delegate.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 55 // Allow the frame to be replaced when entering or exiting the maximized | 55 // Allow the frame to be replaced when entering or exiting the maximized |
| 56 // state. | 56 // state. |
| 57 if (browser_frame_->non_client_view() && | 57 if (browser_frame_->non_client_view() && |
| 58 browser_frame_aura_->browser_view()->browser()->is_app() && | 58 browser_frame_aura_->browser_view()->browser()->is_app() && |
| 59 (old_state == ui::SHOW_STATE_MAXIMIZED || | 59 (old_state == ui::SHOW_STATE_MAXIMIZED || |
| 60 new_state == ui::SHOW_STATE_MAXIMIZED)) { | 60 new_state == ui::SHOW_STATE_MAXIMIZED)) { |
| 61 // Defer frame layout when replacing the frame. Layout will occur when the | 61 // Defer frame layout when replacing the frame. Layout will occur when the |
| 62 // window's bounds are updated. The window maximize/restore animations | 62 // window's bounds are updated. The window maximize/restore animations |
| 63 // clone the window's layers and rely on the subsequent layout to set | 63 // clone the window's layers and rely on the subsequent layout to set |
| 64 // the layer sizes. | 64 // the layer sizes. |
| 65 browser_frame_->non_client_view()->UpdateFrame(false); | 65 browser_frame_->non_client_view()->UpdateFrame( |
| 66 old_state == ui::SHOW_STATE_MINIMIZED); | |
|
sky
2012/09/25 18:39:49
Update comment.
Mr4D (OOO till 08-26)
2012/09/25 20:30:34
Done.
| |
| 66 } | 67 } |
| 67 } | 68 } |
| 68 | 69 |
| 69 virtual void OnWindowBoundsChanged(aura::Window* window, | 70 virtual void OnWindowBoundsChanged(aura::Window* window, |
| 70 const gfx::Rect& old_bounds, | 71 const gfx::Rect& old_bounds, |
| 71 const gfx::Rect& new_bounds) OVERRIDE { | 72 const gfx::Rect& new_bounds) OVERRIDE { |
| 72 // Don't do anything if we don't have our non-client view yet. | 73 // Don't do anything if we don't have our non-client view yet. |
| 73 if (!browser_frame_->non_client_view()) | 74 if (!browser_frame_->non_client_view()) |
| 74 return; | 75 return; |
| 75 | 76 |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 209 return new DesktopBrowserFrameAura(browser_frame, browser_view); | 210 return new DesktopBrowserFrameAura(browser_frame, browser_view); |
| 210 #endif | 211 #endif |
| 211 return new BrowserFrameAura(browser_frame, browser_view); | 212 return new BrowserFrameAura(browser_frame, browser_view); |
| 212 } | 213 } |
| 213 | 214 |
| 214 /////////////////////////////////////////////////////////////////////////////// | 215 /////////////////////////////////////////////////////////////////////////////// |
| 215 // BrowserFrameAura, private: | 216 // BrowserFrameAura, private: |
| 216 | 217 |
| 217 BrowserFrameAura::~BrowserFrameAura() { | 218 BrowserFrameAura::~BrowserFrameAura() { |
| 218 } | 219 } |
| OLD | NEW |