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

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 1836 matching lines...) Expand 10 before | Expand all | Expand 10 after
1847 AutomationJSONReply(automation_, 1847 AutomationJSONReply(automation_,
1848 reply_message_.release()).SendSuccess(NULL); 1848 reply_message_.release()).SendSuccess(NULL);
1849 } 1849 }
1850 delete this; 1850 delete this;
1851 } else { 1851 } else {
1852 NOTREACHED(); 1852 NOTREACHED();
1853 } 1853 }
1854 } 1854 }
1855 1855
1856 SavePackageNotificationObserver::SavePackageNotificationObserver( 1856 SavePackageNotificationObserver::SavePackageNotificationObserver(
1857 SavePackage* save_package, 1857 DownloadManager* download_manager,
1858 AutomationProvider* automation, 1858 AutomationProvider* automation,
1859 IPC::Message* reply_message) 1859 IPC::Message* reply_message)
1860 : automation_(automation->AsWeakPtr()), 1860 : automation_(automation->AsWeakPtr()),
1861 reply_message_(reply_message) { 1861 reply_message_(reply_message) {
1862 Source<SavePackage> source(save_package); 1862 Source<DownloadManager> source(download_manager);
1863 registrar_.Add(this, content::NOTIFICATION_SAVE_PACKAGE_SUCCESSFULLY_FINISHED, 1863 registrar_.Add(this, content::NOTIFICATION_SAVE_PACKAGE_SUCCESSFULLY_FINISHED,
1864 source); 1864 source);
1865 } 1865 }
1866 1866
1867 SavePackageNotificationObserver::~SavePackageNotificationObserver() {} 1867 SavePackageNotificationObserver::~SavePackageNotificationObserver() {}
1868 1868
1869 void SavePackageNotificationObserver::Observe( 1869 void SavePackageNotificationObserver::Observe(
1870 int type, 1870 int type,
1871 const NotificationSource& source, 1871 const NotificationSource& source,
1872 const NotificationDetails& details) { 1872 const NotificationDetails& details) {
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
2650 void DragTargetDropAckNotificationObserver::Observe( 2650 void DragTargetDropAckNotificationObserver::Observe(
2651 int type, 2651 int type,
2652 const NotificationSource& source, 2652 const NotificationSource& source,
2653 const NotificationDetails& details) { 2653 const NotificationDetails& details) {
2654 if (automation_) { 2654 if (automation_) {
2655 AutomationJSONReply(automation_, 2655 AutomationJSONReply(automation_,
2656 reply_message_.release()).SendSuccess(NULL); 2656 reply_message_.release()).SendSuccess(NULL);
2657 } 2657 }
2658 delete this; 2658 delete this;
2659 } 2659 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider_observers.h ('k') | chrome/browser/automation/testing_automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698