OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/startup/startup_browser_creator.h" | 5 #include "chrome/browser/ui/startup/startup_browser_creator.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> // For max(). | 9 #include <algorithm> // For max(). |
10 #include <memory> | 10 #include <memory> |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
96 | 96 |
97 #if defined(OS_MACOSX) | 97 #if defined(OS_MACOSX) |
98 #include "chrome/browser/web_applications/web_app_mac.h" | 98 #include "chrome/browser/web_applications/web_app_mac.h" |
99 #endif | 99 #endif |
100 | 100 |
101 #if defined(OS_WIN) | 101 #if defined(OS_WIN) |
102 #include "chrome/browser/metrics/jumplist_metrics_win.h" | 102 #include "chrome/browser/metrics/jumplist_metrics_win.h" |
103 #endif | 103 #endif |
104 | 104 |
105 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 105 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
106 #include "ui/views/widget/desktop_aura/x11_desktop_handler.h" | 106 #include "ui/events/platform/x11/x11_event_source.h" |
107 #endif | 107 #endif |
108 | 108 |
109 #if defined(ENABLE_PRINT_PREVIEW) | 109 #if defined(ENABLE_PRINT_PREVIEW) |
110 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" | 110 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" |
111 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory. h" | 111 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory. h" |
112 #include "chrome/browser/printing/print_dialog_cloud.h" | 112 #include "chrome/browser/printing/print_dialog_cloud.h" |
113 #endif | 113 #endif |
114 | 114 |
115 #if defined(ENABLE_APP_LIST) | 115 #if defined(ENABLE_APP_LIST) |
116 #include "chrome/browser/ui/app_list/app_list_service.h" | 116 #include "chrome/browser/ui/app_list/app_list_service.h" |
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
704 #endif // defined(OS_WIN) | 704 #endif // defined(OS_WIN) |
705 | 705 |
706 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 706 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
707 // Our request to Activate may be discarded on some linux window | 707 // Our request to Activate may be discarded on some linux window |
708 // managers unless given a recent timestamp, so update the timestamp if | 708 // managers unless given a recent timestamp, so update the timestamp if |
709 // we were given one. | 709 // we were given one. |
710 if (command_line.HasSwitch(switches::kWmUserTimeMs)) { | 710 if (command_line.HasSwitch(switches::kWmUserTimeMs)) { |
711 uint64_t time; | 711 uint64_t time; |
712 std::string switch_value = | 712 std::string switch_value = |
713 command_line.GetSwitchValueASCII(switches::kWmUserTimeMs); | 713 command_line.GetSwitchValueASCII(switches::kWmUserTimeMs); |
714 if (base::StringToUint64(switch_value, &time)) { | 714 if (base::StringToUint64(switch_value, &time) && |
715 views::X11DesktopHandler::get()->set_wm_user_time_ms( | 715 ui::X11EventSource::HasInstance()) { |
716 ui::X11EventSource::GetInstance()->SetLastSeenServerTime( | |
danakj
2016/08/11 21:48:19
I'm a bit unsure about why we're using the "window
Tom (Use chromium acct)
2016/08/15 18:42:45
It's because metacity/mutter/muffin all deny activ
| |
716 static_cast<Time>(time)); | 717 static_cast<Time>(time)); |
717 } | 718 } |
718 } | 719 } |
719 #endif | 720 #endif |
720 | 721 |
721 chrome::startup::IsProcessStartup is_process_startup = process_startup ? | 722 chrome::startup::IsProcessStartup is_process_startup = process_startup ? |
722 chrome::startup::IS_PROCESS_STARTUP : | 723 chrome::startup::IS_PROCESS_STARTUP : |
723 chrome::startup::IS_NOT_PROCESS_STARTUP; | 724 chrome::startup::IS_NOT_PROCESS_STARTUP; |
724 chrome::startup::IsFirstRun is_first_run = first_run::IsChromeFirstRun() ? | 725 chrome::startup::IsFirstRun is_first_run = first_run::IsChromeFirstRun() ? |
725 chrome::startup::IS_FIRST_RUN : chrome::startup::IS_NOT_FIRST_RUN; | 726 chrome::startup::IS_FIRST_RUN : chrome::startup::IS_NOT_FIRST_RUN; |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
953 if (!entry->IsSigninRequired()) { | 954 if (!entry->IsSigninRequired()) { |
954 Profile* profile = profile_manager->GetProfile(entry->GetPath()); | 955 Profile* profile = profile_manager->GetProfile(entry->GetPath()); |
955 if (profile) | 956 if (profile) |
956 return profile; | 957 return profile; |
957 } | 958 } |
958 } | 959 } |
959 | 960 |
960 return nullptr; | 961 return nullptr; |
961 } | 962 } |
962 #endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID) | 963 #endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID) |
OLD | NEW |