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

Side by Side Diff: chrome/browser/chromeos/first_run/drive_first_run_controller.cc

Issue 1336823003: Move chrome::HostDesktopType to ui::HostDesktopType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@base_session_service_delegate_impl
Patch Set: Fix build on Mac and CrOS Created 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/first_run/drive_first_run_controller.h" 5 #include "chrome/browser/chromeos/first_run/drive_first_run_controller.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/system/tray/system_tray_delegate.h" 8 #include "ash/system/tray/system_tray_delegate.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 DISALLOW_COPY_AND_ASSIGN(DriveOfflineNotificationDelegate); 96 DISALLOW_COPY_AND_ASSIGN(DriveOfflineNotificationDelegate);
97 }; 97 };
98 98
99 void DriveOfflineNotificationDelegate::ButtonClick(int button_index) { 99 void DriveOfflineNotificationDelegate::ButtonClick(int button_index) {
100 DCHECK_EQ(0, button_index); 100 DCHECK_EQ(0, button_index);
101 101
102 // The support page will be localized based on the user's GAIA account. 102 // The support page will be localized based on the user's GAIA account.
103 const GURL url = GURL(kDriveOfflineSupportUrl); 103 const GURL url = GURL(kDriveOfflineSupportUrl);
104 104
105 chrome::ScopedTabbedBrowserDisplayer displayer( 105 chrome::ScopedTabbedBrowserDisplayer displayer(profile_,
106 profile_, 106 ui::HOST_DESKTOP_TYPE_ASH);
107 chrome::HOST_DESKTOP_TYPE_ASH);
108 chrome::ShowSingletonTabOverwritingNTP( 107 chrome::ShowSingletonTabOverwritingNTP(
109 displayer.browser(), 108 displayer.browser(),
110 chrome::GetSingletonTabNavigateParams(displayer.browser(), url)); 109 chrome::GetSingletonTabNavigateParams(displayer.browser(), url));
111 } 110 }
112 111
113 //////////////////////////////////////////////////////////////////////////////// 112 ////////////////////////////////////////////////////////////////////////////////
114 // DriveWebContentsManager 113 // DriveWebContentsManager
115 114
116 // Manages web contents that initializes Google Drive offline mode. We create 115 // Manages web contents that initializes Google Drive offline mode. We create
117 // a background WebContents that loads a Drive endpoint to initialize offline 116 // a background WebContents that loads a Drive endpoint to initialize offline
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 resource_bundle.GetImageNamed(IDR_NOTIFICATION_DRIVE), 468 resource_bundle.GetImageNamed(IDR_NOTIFICATION_DRIVE),
470 base::UTF8ToUTF16(extension->name()), GURL(), 469 base::UTF8ToUTF16(extension->name()), GURL(),
471 message_center::NotifierId(message_center::NotifierId::APPLICATION, 470 message_center::NotifierId(message_center::NotifierId::APPLICATION,
472 kDriveHostedAppId), 471 kDriveHostedAppId),
473 data, new DriveOfflineNotificationDelegate(profile_))); 472 data, new DriveOfflineNotificationDelegate(profile_)));
474 notification->set_priority(message_center::LOW_PRIORITY); 473 notification->set_priority(message_center::LOW_PRIORITY);
475 message_center::MessageCenter::Get()->AddNotification(notification.Pass()); 474 message_center::MessageCenter::Get()->AddNotification(notification.Pass());
476 } 475 }
477 476
478 } // namespace chromeos 477 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698