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

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

Issue 7850026: Aura under Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: White spaces Created 9 years, 3 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/background_view.h" 5 #include "chrome/browser/chromeos/login/background_view.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 shutdown_button_ = NULL; 122 shutdown_button_ = NULL;
123 SchedulePaint(); 123 SchedulePaint();
124 } 124 }
125 } 125 }
126 126
127 // static 127 // static
128 views::Widget* BackgroundView::CreateWindowContainingView( 128 views::Widget* BackgroundView::CreateWindowContainingView(
129 const gfx::Rect& bounds, 129 const gfx::Rect& bounds,
130 const GURL& background_url, 130 const GURL& background_url,
131 BackgroundView** view) { 131 BackgroundView** view) {
132 #if defined(USE_AURA)
133 // TODO(saintlou):
oshima 2011/09/19 15:52:39 I believe this will be gone
Emmanuel Saint-loubert-Bié 2011/09/19 20:15:36 Done.
134 return NULL;
135 #else
132 Widget* window = new Widget; 136 Widget* window = new Widget;
133 Widget::InitParams params(Widget::InitParams::TYPE_WINDOW_FRAMELESS); 137 Widget::InitParams params(Widget::InitParams::TYPE_WINDOW_FRAMELESS);
134 params.bounds = bounds; 138 params.bounds = bounds;
135 window->Init(params); 139 window->Init(params);
136 *view = new BackgroundView(); 140 *view = new BackgroundView();
137 (*view)->Init(background_url); 141 (*view)->Init(background_url);
138 142
139 if ((*view)->ScreenSaverEnabled()) 143 if ((*view)->ScreenSaverEnabled())
140 (*view)->ShowScreenSaver(); 144 (*view)->ShowScreenSaver();
141 145
142 window->SetContentsView(*view); 146 window->SetContentsView(*view);
143 147
144 (*view)->UpdateWindowType(); 148 (*view)->UpdateWindowType();
145 149
146 // This keeps the window from flashing at startup. 150 // This keeps the window from flashing at startup.
147 GdkWindow* gdk_window = window->GetNativeView()->window; 151 GdkWindow* gdk_window = window->GetNativeView()->window;
148 gdk_window_set_back_pixmap(gdk_window, NULL, false); 152 gdk_window_set_back_pixmap(gdk_window, NULL, false);
149 153
150 LoginUtils::Get()->SetBackgroundView(*view); 154 LoginUtils::Get()->SetBackgroundView(*view);
151 155
152 return window; 156 return window;
157 #endif
153 } 158 }
154 159
155 void BackgroundView::CreateModalPopup(views::WidgetDelegate* view) { 160 void BackgroundView::CreateModalPopup(views::WidgetDelegate* view) {
156 views::Widget* window = browser::CreateViewsWindow( 161 views::Widget* window = browser::CreateViewsWindow(
157 GetNativeWindow(), view); 162 GetNativeWindow(), view);
158 window->SetAlwaysOnTop(true); 163 window->SetAlwaysOnTop(true);
159 window->Show(); 164 window->Show();
160 } 165 }
161 166
162 gfx::NativeWindow BackgroundView::GetNativeWindow() const { 167 gfx::NativeWindow BackgroundView::GetNativeWindow() const {
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 386
382 void BackgroundView::UpdateWindowType() { 387 void BackgroundView::UpdateWindowType() {
383 std::vector<int> params; 388 std::vector<int> params;
384 WmIpc::instance()->SetWindowType( 389 WmIpc::instance()->SetWindowType(
385 GTK_WIDGET(GetNativeWindow()), 390 GTK_WIDGET(GetNativeWindow()),
386 WM_IPC_WINDOW_LOGIN_BACKGROUND, 391 WM_IPC_WINDOW_LOGIN_BACKGROUND,
387 &params); 392 &params);
388 } 393 }
389 394
390 } // namespace chromeos 395 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698