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

Side by Side Diff: chrome/browser/chromeos/login/wizard_controller.cc

Issue 6881107: Rework the way Widget::Init works: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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 "chrome/browser/chromeos/login/wizard_controller.h" 5 #include "chrome/browser/chromeos/login/wizard_controller.h"
6 6
7 #include <gdk/gdk.h> 7 #include <gdk/gdk.h>
8 #include <signal.h> 8 #include <signal.h>
9 #include <sys/types.h> 9 #include <sys/types.h>
10 10
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 void WizardController::InitiateOOBEUpdate() { 589 void WizardController::InitiateOOBEUpdate() {
590 GetUpdateScreen()->StartUpdate(); 590 GetUpdateScreen()->StartUpdate();
591 SetCurrentScreenSmooth(GetUpdateScreen(), true); 591 SetCurrentScreenSmooth(GetUpdateScreen(), true);
592 } 592 }
593 593
594 /////////////////////////////////////////////////////////////////////////////// 594 ///////////////////////////////////////////////////////////////////////////////
595 // WizardController, private: 595 // WizardController, private:
596 596
597 views::Widget* WizardController::CreateScreenWindow( 597 views::Widget* WizardController::CreateScreenWindow(
598 const gfx::Rect& bounds, bool initial_show) { 598 const gfx::Rect& bounds, bool initial_show) {
599 views::Widget::CreateParams widget_params( 599 widget_ = views::Widget::CreateWidget();
600 views::Widget::CreateParams::TYPE_WINDOW);
601 widget_params.transparent = true;
602 widget_ = views::Widget::CreateWidget(widget_params);
603 // Window transparency makes background flicker through controls that 600 // Window transparency makes background flicker through controls that
604 // are constantly updating its contents (like image view with video 601 // are constantly updating its contents (like image view with video
605 // stream). Hence enabling double buffer. 602 // stream). Hence enabling double buffer.
606 static_cast<views::WidgetGtk*>(widget_)->EnableDoubleBuffer(true); 603 static_cast<views::WidgetGtk*>(widget_)->EnableDoubleBuffer(true);
607 widget_->Init(NULL, bounds); 604 views::Widget::CreateParams widget_params(
605 views::Widget::CreateParams::TYPE_WINDOW);
606 widget_params.transparent = true;
607 widget_params.bounds = bounds;
608 widget_->Init(widget_params);
608 std::vector<int> params; 609 std::vector<int> params;
609 // For initial show WM would animate background window. 610 // For initial show WM would animate background window.
610 // Otherwise it stays unchaged. 611 // Otherwise it stays unchanged.
611 params.push_back(initial_show); 612 params.push_back(initial_show);
612 chromeos::WmIpc::instance()->SetWindowType( 613 chromeos::WmIpc::instance()->SetWindowType(
613 widget_->GetNativeView(), 614 widget_->GetNativeView(),
614 chromeos::WM_IPC_WINDOW_LOGIN_GUEST, 615 chromeos::WM_IPC_WINDOW_LOGIN_GUEST,
615 &params); 616 &params);
616 widget_->SetContentsView(contents_); 617 widget_->SetContentsView(contents_);
617 return widget_; 618 return widget_;
618 } 619 }
619 620
620 gfx::Rect WizardController::GetWizardScreenBounds(int screen_width, 621 gfx::Rect WizardController::GetWizardScreenBounds(int screen_width,
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 return contents_; 892 return contents_;
892 } 893 }
893 894
894 chromeos::ScreenObserver* WizardController::GetObserver(WizardScreen* screen) { 895 chromeos::ScreenObserver* WizardController::GetObserver(WizardScreen* screen) {
895 return observer_ ? observer_ : this; 896 return observer_ ? observer_ : this;
896 } 897 }
897 898
898 void WizardController::SetZeroDelays() { 899 void WizardController::SetZeroDelays() {
899 kShowDelayMs = 0; 900 kShowDelayMs = 0;
900 } 901 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/user_controller_gtk.cc ('k') | chrome/browser/chromeos/notifications/balloon_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698