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

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

Issue 7358005: Makes sure widget is created at right size before showing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comment Created 9 years, 5 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "views/widget/native_widget_views.h" 5 #include "views/widget/native_widget_views.h"
6 6
7 #include "ui/gfx/compositor/compositor.h" 7 #include "ui/gfx/compositor/compositor.h"
8 #include "views/desktop/desktop_window_view.h" 8 #include "views/desktop/desktop_window_view.h"
9 #include "views/view.h" 9 #include "views/view.h"
10 #include "views/views_delegate.h" 10 #include "views/views_delegate.h"
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 339
340 void NativeWidgetViews::Show() { 340 void NativeWidgetViews::Show() {
341 view_->SetVisible(true); 341 view_->SetVisible(true);
342 GetWidget()->SetInitialFocus(); 342 GetWidget()->SetInitialFocus();
343 } 343 }
344 344
345 void NativeWidgetViews::Hide() { 345 void NativeWidgetViews::Hide() {
346 view_->SetVisible(false); 346 view_->SetVisible(false);
347 } 347 }
348 348
349 void NativeWidgetViews::ShowNativeWidget(ShowState state) { 349 void NativeWidgetViews::ShowWithState(ShowState state) {
350 Show();
351 }
352
353 void NativeWidgetViews::ShowMaximizedWithBounds(
354 const gfx::Rect& restored_bounds) {
355 Show();
350 } 356 }
351 357
352 bool NativeWidgetViews::IsVisible() const { 358 bool NativeWidgetViews::IsVisible() const {
353 return view_->IsVisible(); 359 return view_->IsVisible();
354 } 360 }
355 361
356 void NativeWidgetViews::Activate() { 362 void NativeWidgetViews::Activate() {
357 // Enable WidgetObserverTest.ActivationChange when this is implemented. 363 // Enable WidgetObserverTest.ActivationChange when this is implemented.
358 NOTIMPLEMENTED(); 364 NOTIMPLEMENTED();
359 } 365 }
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 482
477 const internal::NativeWidgetPrivate* 483 const internal::NativeWidgetPrivate*
478 NativeWidgetViews::GetParentNativeWidget() const { 484 NativeWidgetViews::GetParentNativeWidget() const {
479 const Widget* containing_widget = view_->GetWidget(); 485 const Widget* containing_widget = view_->GetWidget();
480 return containing_widget ? static_cast<const internal::NativeWidgetPrivate*>( 486 return containing_widget ? static_cast<const internal::NativeWidgetPrivate*>(
481 containing_widget->native_widget()) : 487 containing_widget->native_widget()) :
482 NULL; 488 NULL;
483 } 489 }
484 490
485 } // namespace views 491 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698