| 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 "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| 11 #include "app/resource_bundle.h" | 11 #include "app/resource_bundle.h" |
| 12 #include "app/x11_util.h" | |
| 13 #include "base/string16.h" | 12 #include "base/string16.h" |
| 14 #include "base/string_util.h" | 13 #include "base/string_util.h" |
| 15 #include "base/stringprintf.h" | 14 #include "base/stringprintf.h" |
| 16 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
| 17 #include "chrome/browser/chromeos/login/helper.h" | 16 #include "chrome/browser/chromeos/login/helper.h" |
| 18 #include "chrome/browser/chromeos/login/login_utils.h" | 17 #include "chrome/browser/chromeos/login/login_utils.h" |
| 19 #include "chrome/browser/chromeos/login/oobe_progress_bar.h" | 18 #include "chrome/browser/chromeos/login/oobe_progress_bar.h" |
| 20 #include "chrome/browser/chromeos/login/proxy_settings_dialog.h" | 19 #include "chrome/browser/chromeos/login/proxy_settings_dialog.h" |
| 21 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" | 20 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" |
| 22 #include "chrome/browser/chromeos/login/shutdown_button.h" | 21 #include "chrome/browser/chromeos/login/shutdown_button.h" |
| 23 #include "chrome/browser/chromeos/login/wizard_controller.h" | 22 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 24 #include "chrome/browser/chromeos/status/clock_menu_button.h" | 23 #include "chrome/browser/chromeos/status/clock_menu_button.h" |
| 25 #include "chrome/browser/chromeos/status/input_method_menu_button.h" | 24 #include "chrome/browser/chromeos/status/input_method_menu_button.h" |
| 26 #include "chrome/browser/chromeos/status/network_menu_button.h" | 25 #include "chrome/browser/chromeos/status/network_menu_button.h" |
| 27 #include "chrome/browser/chromeos/status/status_area_view.h" | 26 #include "chrome/browser/chromeos/status/status_area_view.h" |
| 28 #include "chrome/browser/chromeos/wm_ipc.h" | 27 #include "chrome/browser/chromeos/wm_ipc.h" |
| 29 #include "chrome/browser/profiles/profile_manager.h" | 28 #include "chrome/browser/profiles/profile_manager.h" |
| 30 #include "chrome/browser/ui/views/dom_view.h" | 29 #include "chrome/browser/ui/views/dom_view.h" |
| 31 #include "chrome/browser/ui/views/window.h" | 30 #include "chrome/browser/ui/views/window.h" |
| 32 #include "gfx/gtk_util.h" | 31 #include "gfx/gtk_util.h" |
| 33 #include "googleurl/src/gurl.h" | 32 #include "googleurl/src/gurl.h" |
| 34 #include "grit/chromium_strings.h" | 33 #include "grit/chromium_strings.h" |
| 35 #include "grit/generated_resources.h" | 34 #include "grit/generated_resources.h" |
| 36 #include "grit/theme_resources.h" | 35 #include "grit/theme_resources.h" |
| 37 #include "third_party/cros/chromeos_wm_ipc_enums.h" | 36 #include "third_party/cros/chromeos_wm_ipc_enums.h" |
| 37 #include "ui/base/x/x11_util.h" |
| 38 #include "views/controls/button/text_button.h" | 38 #include "views/controls/button/text_button.h" |
| 39 #include "views/controls/label.h" | 39 #include "views/controls/label.h" |
| 40 #include "views/screen.h" | 40 #include "views/screen.h" |
| 41 #include "views/widget/widget_gtk.h" | 41 #include "views/widget/widget_gtk.h" |
| 42 #include "views/window/window.h" | 42 #include "views/window/window.h" |
| 43 | 43 |
| 44 // X Windows headers have "#define Status int". That interferes with | 44 // X Windows headers have "#define Status int". That interferes with |
| 45 // NetworkLibrary header which defines enum "Status". | 45 // NetworkLibrary header which defines enum "Status". |
| 46 #include <X11/cursorfont.h> // NOLINT | 46 #include <X11/cursorfont.h> // NOLINT |
| 47 #include <X11/Xcursor/Xcursor.h> // NOLINT | 47 #include <X11/Xcursor/Xcursor.h> // NOLINT |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 return gfx::GetCursor(GDK_HAND2); | 91 return gfx::GetCursor(GDK_HAND2); |
| 92 } | 92 } |
| 93 | 93 |
| 94 private: | 94 private: |
| 95 DISALLOW_COPY_AND_ASSIGN(TextButtonWithHandCursorOver); | 95 DISALLOW_COPY_AND_ASSIGN(TextButtonWithHandCursorOver); |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 // This gets rid of the ugly X default cursor. | 98 // This gets rid of the ugly X default cursor. |
| 99 static void ResetXCursor() { | 99 static void ResetXCursor() { |
| 100 // TODO(sky): nuke this once new window manager is in place. | 100 // TODO(sky): nuke this once new window manager is in place. |
| 101 Display* display = x11_util::GetXDisplay(); | 101 Display* display = ui::GetXDisplay(); |
| 102 Cursor cursor = XCreateFontCursor(display, XC_left_ptr); | 102 Cursor cursor = XCreateFontCursor(display, XC_left_ptr); |
| 103 XID root_window = x11_util::GetX11RootWindow(); | 103 XID root_window = ui::GetX11RootWindow(); |
| 104 XSetWindowAttributes attr; | 104 XSetWindowAttributes attr; |
| 105 attr.cursor = cursor; | 105 attr.cursor = cursor; |
| 106 XChangeWindowAttributes(display, root_window, CWCursor, &attr); | 106 XChangeWindowAttributes(display, root_window, CWCursor, &attr); |
| 107 } | 107 } |
| 108 | 108 |
| 109 } // namespace | 109 } // namespace |
| 110 | 110 |
| 111 namespace chromeos { | 111 namespace chromeos { |
| 112 | 112 |
| 113 /////////////////////////////////////////////////////////////////////////////// | 113 /////////////////////////////////////////////////////////////////////////////// |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 kBootTimesNoChromeExec, | 448 kBootTimesNoChromeExec, |
| 449 boot_times.total, | 449 boot_times.total, |
| 450 boot_times.pre_startup, | 450 boot_times.pre_startup, |
| 451 boot_times.system); | 451 boot_times.system); |
| 452 } | 452 } |
| 453 // Use UTF8ToWide once this string is localized. | 453 // Use UTF8ToWide once this string is localized. |
| 454 boot_times_label_->SetText(ASCIIToWide(boot_times_text)); | 454 boot_times_label_->SetText(ASCIIToWide(boot_times_text)); |
| 455 } | 455 } |
| 456 | 456 |
| 457 } // namespace chromeos | 457 } // namespace chromeos |
| OLD | NEW |