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

Side by Side Diff: chrome/browser/ui/startup/startup_browser_creator.cc

Issue 2165083002: Linux: Refactor X11DesktopHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT Created 4 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
OLDNEW
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
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
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(
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
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)
OLDNEW
« no previous file with comments | « chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc ('k') | ui/events/devices/x11/touch_factory_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698