| OLD | NEW |
| 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" |
| 11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
| 12 #include "base/stringprintf.h" | 12 #include "base/stringprintf.h" |
| 13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
| 14 #include "chrome/browser/browser_process.h" | 14 #include "chrome/browser/browser_process.h" |
| 15 #include "chrome/browser/chromeos/login/login_utils.h" | 15 #include "chrome/browser/chromeos/login/login_utils.h" |
| 16 #include "chrome/browser/chromeos/login/proxy_settings_dialog.h" | 16 #include "chrome/browser/chromeos/login/proxy_settings_dialog.h" |
| 17 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" | 17 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" |
| 18 #include "chrome/browser/chromeos/login/shutdown_button.h" | 18 #include "chrome/browser/chromeos/login/shutdown_button.h" |
| 19 #include "chrome/browser/chromeos/login/wizard_controller.h" | 19 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 20 #include "chrome/browser/policy/browser_policy_connector.h" | 20 #include "chrome/browser/policy/browser_policy_connector.h" |
| 21 #include "chrome/browser/profiles/profile_manager.h" | 21 #include "chrome/browser/profiles/profile_manager.h" |
| 22 #include "chrome/browser/ui/dialog_style.h" |
| 22 #include "chrome/browser/ui/views/dom_view.h" | 23 #include "chrome/browser/ui/views/dom_view.h" |
| 23 #include "chrome/browser/ui/views/window.h" | 24 #include "chrome/browser/ui/views/window.h" |
| 24 #include "chrome/common/chrome_version_info.h" | 25 #include "chrome/common/chrome_version_info.h" |
| 25 #include "googleurl/src/gurl.h" | 26 #include "googleurl/src/gurl.h" |
| 26 #include "grit/chromium_strings.h" | 27 #include "grit/chromium_strings.h" |
| 27 #include "grit/generated_resources.h" | 28 #include "grit/generated_resources.h" |
| 28 #include "grit/theme_resources.h" | 29 #include "grit/theme_resources.h" |
| 29 #include "third_party/cros_system_api/window_manager/chromeos_wm_ipc_enums.h" | 30 #include "third_party/cros_system_api/window_manager/chromeos_wm_ipc_enums.h" |
| 30 #include "ui/base/l10n/l10n_util.h" | 31 #include "ui/base/l10n/l10n_util.h" |
| 31 #include "ui/base/resource/resource_bundle.h" | 32 #include "ui/base/resource/resource_bundle.h" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 GdkWindow* gdk_window = window->GetNativeView()->window; | 148 GdkWindow* gdk_window = window->GetNativeView()->window; |
| 148 gdk_window_set_back_pixmap(gdk_window, NULL, false); | 149 gdk_window_set_back_pixmap(gdk_window, NULL, false); |
| 149 | 150 |
| 150 LoginUtils::Get()->SetBackgroundView(*view); | 151 LoginUtils::Get()->SetBackgroundView(*view); |
| 151 | 152 |
| 152 return window; | 153 return window; |
| 153 } | 154 } |
| 154 | 155 |
| 155 void BackgroundView::CreateModalPopup(views::WidgetDelegate* view) { | 156 void BackgroundView::CreateModalPopup(views::WidgetDelegate* view) { |
| 156 views::Widget* window = browser::CreateViewsWindow( | 157 views::Widget* window = browser::CreateViewsWindow( |
| 157 GetNativeWindow(), view); | 158 GetNativeWindow(), view, STYLE_GENERIC); |
| 158 window->SetAlwaysOnTop(true); | 159 window->SetAlwaysOnTop(true); |
| 159 window->Show(); | 160 window->Show(); |
| 160 } | 161 } |
| 161 | 162 |
| 162 gfx::NativeWindow BackgroundView::GetNativeWindow() const { | 163 gfx::NativeWindow BackgroundView::GetNativeWindow() const { |
| 163 return GetWidget()->GetNativeWindow(); | 164 return GetWidget()->GetNativeWindow(); |
| 164 } | 165 } |
| 165 | 166 |
| 166 void BackgroundView::SetStatusAreaVisible(bool visible) { | 167 void BackgroundView::SetStatusAreaVisible(bool visible) { |
| 167 status_area_->SetVisible(visible); | 168 status_area_->SetVisible(visible); |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 #if defined(TOOLKIT_USES_GTK) | 337 #if defined(TOOLKIT_USES_GTK) |
| 337 std::vector<int> params; | 338 std::vector<int> params; |
| 338 WmIpc::instance()->SetWindowType( | 339 WmIpc::instance()->SetWindowType( |
| 339 GTK_WIDGET(GetNativeWindow()), | 340 GTK_WIDGET(GetNativeWindow()), |
| 340 WM_IPC_WINDOW_LOGIN_BACKGROUND, | 341 WM_IPC_WINDOW_LOGIN_BACKGROUND, |
| 341 ¶ms); | 342 ¶ms); |
| 342 #endif | 343 #endif |
| 343 } | 344 } |
| 344 | 345 |
| 345 } // namespace chromeos | 346 } // namespace chromeos |
| OLD | NEW |