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

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

Issue 933893003: Use standard icon/title in global error bubble (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « ui/views/bubble/bubble_frame_view.cc ('k') | ui/views/window/dialog_delegate_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/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 } 350 }
351 native_widget_->InitNativeWidget(params); 351 native_widget_->InitNativeWidget(params);
352 if (RequiresNonClientView(params.type)) { 352 if (RequiresNonClientView(params.type)) {
353 non_client_view_ = new NonClientView; 353 non_client_view_ = new NonClientView;
354 non_client_view_->SetFrameView(CreateNonClientFrameView()); 354 non_client_view_->SetFrameView(CreateNonClientFrameView());
355 // Create the ClientView, add it to the NonClientView and add the 355 // Create the ClientView, add it to the NonClientView and add the
356 // NonClientView to the RootView. This will cause everything to be parented. 356 // NonClientView to the RootView. This will cause everything to be parented.
357 non_client_view_->set_client_view(widget_delegate_->CreateClientView(this)); 357 non_client_view_->set_client_view(widget_delegate_->CreateClientView(this));
358 non_client_view_->SetOverlayView(widget_delegate_->CreateOverlayView()); 358 non_client_view_->SetOverlayView(widget_delegate_->CreateOverlayView());
359 SetContentsView(non_client_view_); 359 SetContentsView(non_client_view_);
360 // Initialize the window's title before setting the window's initial bounds; 360 // Initialize the window's icon and title before setting the window's
361 // the frame view's preferred height may depend on the presence of a title. 361 // initial bounds; the frame view's preferred height may depend on the
362 // presence of an icon or a title.
363 UpdateWindowIcon();
362 UpdateWindowTitle(); 364 UpdateWindowTitle();
363 non_client_view_->ResetWindowControls(); 365 non_client_view_->ResetWindowControls();
364 SetInitialBounds(params.bounds); 366 SetInitialBounds(params.bounds);
365 if (params.show_state == ui::SHOW_STATE_MAXIMIZED) 367 if (params.show_state == ui::SHOW_STATE_MAXIMIZED)
366 Maximize(); 368 Maximize();
367 else if (params.show_state == ui::SHOW_STATE_MINIMIZED) 369 else if (params.show_state == ui::SHOW_STATE_MINIMIZED)
368 Minimize(); 370 Minimize();
369 } else if (params.delegate) { 371 } else if (params.delegate) {
370 SetContentsView(params.delegate->GetContentsView()); 372 SetContentsView(params.delegate->GetContentsView());
371 SetInitialBoundsForFramelessWindow(params.bounds); 373 SetInitialBoundsForFramelessWindow(params.bounds);
(...skipping 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 1538
1537 //////////////////////////////////////////////////////////////////////////////// 1539 ////////////////////////////////////////////////////////////////////////////////
1538 // internal::NativeWidgetPrivate, NativeWidget implementation: 1540 // internal::NativeWidgetPrivate, NativeWidget implementation:
1539 1541
1540 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { 1542 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() {
1541 return this; 1543 return this;
1542 } 1544 }
1543 1545
1544 } // namespace internal 1546 } // namespace internal
1545 } // namespace views 1547 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/bubble/bubble_frame_view.cc ('k') | ui/views/window/dialog_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698