Chromium Code Reviews| Index: chrome/browser/ui/views/frame/app_non_client_frame_view_aura.cc |
| diff --git a/chrome/browser/ui/views/frame/app_non_client_frame_view_aura.cc b/chrome/browser/ui/views/frame/app_non_client_frame_view_aura.cc |
| index 0be6d628023e5012313567a63107e59e80c0e994..42f8c425d0c88c9d54fd6bb62903fec93f793a68 100644 |
| --- a/chrome/browser/ui/views/frame/app_non_client_frame_view_aura.cc |
| +++ b/chrome/browser/ui/views/frame/app_non_client_frame_view_aura.cc |
| @@ -162,6 +162,9 @@ class AppNonClientFrameViewAura::FrameObserver : public views::WidgetObserver { |
| DISALLOW_COPY_AND_ASSIGN(FrameObserver); |
| }; |
| +const char AppNonClientFrameViewAura::kControlWindowName[] = |
|
sky
2012/09/20 20:02:15
Typically we put:
// static
on the line before thi
James Cook
2012/09/20 20:06:54
Done.
|
| + "AppNonClientFrameViewAuraControls"; |
| + |
| AppNonClientFrameViewAura::AppNonClientFrameViewAura( |
| BrowserFrame* frame, BrowserView* browser_view) |
| : BrowserNonClientFrameView(frame, browser_view), |
| @@ -182,7 +185,7 @@ AppNonClientFrameViewAura::AppNonClientFrameViewAura( |
| control_widget_->Init(params); |
| control_widget_->SetContentsView(control_view_); |
| aura::Window* window = control_widget_->GetNativeView(); |
| - window->SetName("AppNonClientFrameViewAuraControls"); |
| + window->SetName(kControlWindowName); |
| gfx::Rect control_bounds = GetControlBounds(); |
| window->SetBounds(control_bounds); |
| control_widget_->Show(); |
| @@ -190,6 +193,9 @@ AppNonClientFrameViewAura::AppNonClientFrameViewAura( |
| AppNonClientFrameViewAura::~AppNonClientFrameViewAura() { |
| frame()->RemoveObserver(frame_observer_.get()); |
| + // This frame view can be replaced (and deleted) if the window is restored |
| + // via a keyboard shortcut like Alt-[. Ensure we close the control widget. |
| + CloseControlWidget(); |
| } |
| gfx::Rect AppNonClientFrameViewAura::GetBoundsForClientView() const { |