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

Side by Side Diff: chrome/browser/automation/automation_provider_observers.cc

Issue 7277073: Support for adding save page download items into downloads history. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
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/automation/automation_provider_observers.h" 5 #include "chrome/browser/automation/automation_provider_observers.h"
6 6
7 #include <deque> 7 #include <deque>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1834 matching lines...) Expand 10 before | Expand all | Expand 10 after
1845 AutomationJSONReply(automation_, 1845 AutomationJSONReply(automation_,
1846 reply_message_.release()).SendSuccess(NULL); 1846 reply_message_.release()).SendSuccess(NULL);
1847 } 1847 }
1848 delete this; 1848 delete this;
1849 } else { 1849 } else {
1850 NOTREACHED(); 1850 NOTREACHED();
1851 } 1851 }
1852 } 1852 }
1853 1853
1854 SavePackageNotificationObserver::SavePackageNotificationObserver( 1854 SavePackageNotificationObserver::SavePackageNotificationObserver(
1855 SavePackage* save_package, 1855 DownloadManager* download_manager,
1856 AutomationProvider* automation, 1856 AutomationProvider* automation,
1857 IPC::Message* reply_message) 1857 IPC::Message* reply_message)
1858 : automation_(automation->AsWeakPtr()), 1858 : automation_(automation->AsWeakPtr()),
1859 reply_message_(reply_message) { 1859 reply_message_(reply_message) {
1860 Source<SavePackage> source(save_package); 1860 Source<DownloadManager> source(download_manager);
1861 registrar_.Add(this, content::NOTIFICATION_SAVE_PACKAGE_SUCCESSFULLY_FINISHED, 1861 registrar_.Add(this, content::NOTIFICATION_SAVE_PACKAGE_SUCCESSFULLY_FINISHED,
1862 source); 1862 source);
1863 } 1863 }
1864 1864
1865 SavePackageNotificationObserver::~SavePackageNotificationObserver() {} 1865 SavePackageNotificationObserver::~SavePackageNotificationObserver() {}
1866 1866
1867 void SavePackageNotificationObserver::Observe( 1867 void SavePackageNotificationObserver::Observe(
1868 int type, 1868 int type,
1869 const NotificationSource& source, 1869 const NotificationSource& source,
1870 const NotificationDetails& details) { 1870 const NotificationDetails& details) {
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
2648 void DragTargetDropAckNotificationObserver::Observe( 2648 void DragTargetDropAckNotificationObserver::Observe(
2649 int type, 2649 int type,
2650 const NotificationSource& source, 2650 const NotificationSource& source,
2651 const NotificationDetails& details) { 2651 const NotificationDetails& details) {
2652 if (automation_) { 2652 if (automation_) {
2653 AutomationJSONReply(automation_, 2653 AutomationJSONReply(automation_,
2654 reply_message_.release()).SendSuccess(NULL); 2654 reply_message_.release()).SendSuccess(NULL);
2655 } 2655 }
2656 delete this; 2656 delete this;
2657 } 2657 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698