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

Side by Side Diff: ui/views/widget/widget.cc

Issue 133073010: [Views] Cause the window controls to be reset independent of title update in the non-client view. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add test Created 6 years, 11 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 | « no previous file | ui/views/widget/widget_unittest.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 (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 "ui/views/widget/widget.h" 5 #include "ui/views/widget/widget.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 non_client_view_ = new NonClientView; 374 non_client_view_ = new NonClientView;
375 non_client_view_->SetFrameView(CreateNonClientFrameView()); 375 non_client_view_->SetFrameView(CreateNonClientFrameView());
376 // Create the ClientView, add it to the NonClientView and add the 376 // Create the ClientView, add it to the NonClientView and add the
377 // NonClientView to the RootView. This will cause everything to be parented. 377 // NonClientView to the RootView. This will cause everything to be parented.
378 non_client_view_->set_client_view(widget_delegate_->CreateClientView(this)); 378 non_client_view_->set_client_view(widget_delegate_->CreateClientView(this));
379 non_client_view_->SetOverlayView(widget_delegate_->CreateOverlayView()); 379 non_client_view_->SetOverlayView(widget_delegate_->CreateOverlayView());
380 SetContentsView(non_client_view_); 380 SetContentsView(non_client_view_);
381 // Initialize the window's title before setting the window's initial bounds; 381 // Initialize the window's title before setting the window's initial bounds;
382 // the frame view's preferred height may depend on the presence of a title. 382 // the frame view's preferred height may depend on the presence of a title.
383 UpdateWindowTitle(); 383 UpdateWindowTitle();
384 non_client_view_->ResetWindowControls();
384 SetInitialBounds(params.bounds); 385 SetInitialBounds(params.bounds);
385 if (params.show_state == ui::SHOW_STATE_MAXIMIZED) 386 if (params.show_state == ui::SHOW_STATE_MAXIMIZED)
386 Maximize(); 387 Maximize();
387 else if (params.show_state == ui::SHOW_STATE_MINIMIZED) 388 else if (params.show_state == ui::SHOW_STATE_MINIMIZED)
388 Minimize(); 389 Minimize();
389 } else if (params.delegate) { 390 } else if (params.delegate) {
390 SetContentsView(params.delegate->GetContentsView()); 391 SetContentsView(params.delegate->GetContentsView());
391 SetInitialBoundsForFramelessWindow(params.bounds); 392 SetInitialBoundsForFramelessWindow(params.bounds);
392 } 393 }
393 native_widget_initialized_ = true; 394 native_widget_initialized_ = true;
(...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after
1426 1427
1427 //////////////////////////////////////////////////////////////////////////////// 1428 ////////////////////////////////////////////////////////////////////////////////
1428 // internal::NativeWidgetPrivate, NativeWidget implementation: 1429 // internal::NativeWidgetPrivate, NativeWidget implementation:
1429 1430
1430 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { 1431 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() {
1431 return this; 1432 return this;
1432 } 1433 }
1433 1434
1434 } // namespace internal 1435 } // namespace internal
1435 } // namespace views 1436 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698