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

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

Issue 9359022: Aura: Support hovering restore & close buttons for full screen apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix browser_test Created 8 years, 10 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
OLDNEW
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 "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "chrome/browser/chromeos/status/status_area_view.h" 10 #include "chrome/browser/chromeos/status/status_area_view.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 BrowserFrame* browser_frame) 222 BrowserFrame* browser_frame)
223 : browser_frame_aura_(browser_frame_aura), 223 : browser_frame_aura_(browser_frame_aura),
224 browser_frame_(browser_frame) {} 224 browser_frame_(browser_frame) {}
225 225
226 virtual void OnWindowPropertyChanged(aura::Window* window, 226 virtual void OnWindowPropertyChanged(aura::Window* window,
227 const void* key, 227 const void* key,
228 intptr_t old) { 228 intptr_t old) {
229 if (key != aura::client::kShowStateKey) 229 if (key != aura::client::kShowStateKey)
230 return; 230 return;
231 231
232 // Allow the frame to be replaced when maximizing an app.
233 if (browser_frame_->non_client_view() &&
234 browser_frame_aura_->browser_view()->browser()->is_app())
235 browser_frame_->non_client_view()->UpdateFrame();
236
232 // When migrating from regular ChromeOS to Aura, windows can have saved 237 // When migrating from regular ChromeOS to Aura, windows can have saved
233 // restore bounds that are exactly equal to the maximized bounds. Thus when 238 // restore bounds that are exactly equal to the maximized bounds. Thus when
234 // you hit maximize, there is no resize and the layout doesn't get 239 // you hit maximize, there is no resize and the layout doesn't get
235 // refreshed. This can also theoretically happen if a user drags a window to 240 // refreshed. This can also theoretically happen if a user drags a window to
236 // 0,0 then resizes it to fill the workspace, then hits maximize. We need 241 // 0,0 then resizes it to fill the workspace, then hits maximize. We need
237 // to force a layout on show state changes. crbug.com/108073 242 // to force a layout on show state changes. crbug.com/108073
238 if (browser_frame_->non_client_view()) 243 if (browser_frame_->non_client_view())
239 browser_frame_->non_client_view()->Layout(); 244 browser_frame_->non_client_view()->Layout();
240 245
241 // Watch for status area bounds change for maximized browser window in Aura 246 // Watch for status area bounds change for maximized browser window in Aura
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 323
319 //////////////////////////////////////////////////////////////////////////////// 324 ////////////////////////////////////////////////////////////////////////////////
320 // NativeBrowserFrame, public: 325 // NativeBrowserFrame, public:
321 326
322 // static 327 // static
323 NativeBrowserFrame* NativeBrowserFrame::CreateNativeBrowserFrame( 328 NativeBrowserFrame* NativeBrowserFrame::CreateNativeBrowserFrame(
324 BrowserFrame* browser_frame, 329 BrowserFrame* browser_frame,
325 BrowserView* browser_view) { 330 BrowserView* browser_view) {
326 return new BrowserFrameAura(browser_frame, browser_view); 331 return new BrowserFrameAura(browser_frame, browser_view);
327 } 332 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698