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

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

Issue 2280003: Use IPC to wait for download in DownloadTest. (Closed) Base URL: git://codf21.jail.google.com/chromium.git
Patch Set: Fix compile error. Created 10 years, 7 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #ifndef CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ 5 #ifndef CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_
6 #define CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ 6 #define CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 481
482 private: 482 private:
483 NotificationRegistrar registrar_; 483 NotificationRegistrar registrar_;
484 AutomationProvider* automation_; 484 AutomationProvider* automation_;
485 IPC::Message* reply_message_; 485 IPC::Message* reply_message_;
486 486
487 DISALLOW_COPY_AND_ASSIGN(LoginManagerObserver); 487 DISALLOW_COPY_AND_ASSIGN(LoginManagerObserver);
488 }; 488 };
489 #endif 489 #endif
490 490
491 // Waits for the download shelf to appear or disappear
492 // (depending on |visibility|).
493 class DownloadShelfVisibilityObserver : public NotificationObserver {
494 public:
495 DownloadShelfVisibilityObserver(AutomationProvider* automation,
496 Browser* browser,
497 bool visiblity,
498 IPC::Message* reply_message);
499 ~DownloadShelfVisibilityObserver();
500
501 // NotificationObserver interface.
502 virtual void Observe(NotificationType type, const NotificationSource& source,
503 const NotificationDetails& details);
504
505 private:
506 NotificationRegistrar registrar_;
507 AutomationProvider* automation_;
508 bool visibility_;
509 IPC::Message* reply_message_;
510
511 DISALLOW_COPY_AND_ASSIGN(DownloadShelfVisibilityObserver);
512 };
513
491 // Waits for the bookmark model to load. 514 // Waits for the bookmark model to load.
492 class AutomationProviderBookmarkModelObserver : BookmarkModelObserver { 515 class AutomationProviderBookmarkModelObserver : BookmarkModelObserver {
493 public: 516 public:
494 AutomationProviderBookmarkModelObserver(AutomationProvider* provider, 517 AutomationProviderBookmarkModelObserver(AutomationProvider* provider,
495 IPC::Message* reply_message, 518 IPC::Message* reply_message,
496 BookmarkModel* model); 519 BookmarkModel* model);
497 virtual ~AutomationProviderBookmarkModelObserver(); 520 virtual ~AutomationProviderBookmarkModelObserver();
498 521
499 virtual void Loaded(BookmarkModel* model) { 522 virtual void Loaded(BookmarkModel* model) {
500 ReplyAndDelete(true); 523 ReplyAndDelete(true);
(...skipping 28 matching lines...) Expand all
529 552
530 scoped_refptr<AutomationProvider> automation_provider_; 553 scoped_refptr<AutomationProvider> automation_provider_;
531 IPC::Message* reply_message_; 554 IPC::Message* reply_message_;
532 BookmarkModel* model_; 555 BookmarkModel* model_;
533 556
534 DISALLOW_COPY_AND_ASSIGN(AutomationProviderBookmarkModelObserver); 557 DISALLOW_COPY_AND_ASSIGN(AutomationProviderBookmarkModelObserver);
535 }; 558 };
536 559
537 // When asked for pending downloads, the DownloadManager places 560 // When asked for pending downloads, the DownloadManager places
538 // results in a DownloadManager::Observer. 561 // results in a DownloadManager::Observer.
539 class AutomationProviderDownloadManagerObserver : 562 class AutomationProviderDownloadManagerObserver
540 public DownloadManager::Observer { 563 : public DownloadManager::Observer {
541 public: 564 public:
542 AutomationProviderDownloadManagerObserver() : DownloadManager::Observer() {} 565 AutomationProviderDownloadManagerObserver() : DownloadManager::Observer() {}
543 virtual ~AutomationProviderDownloadManagerObserver() {} 566 virtual ~AutomationProviderDownloadManagerObserver() {}
544 virtual void ModelChanged() {} 567 virtual void ModelChanged() {}
545 virtual void SetDownloads(std::vector<DownloadItem*>& downloads) { 568 virtual void SetDownloads(std::vector<DownloadItem*>& downloads) {
546 downloads_ = downloads; 569 downloads_ = downloads;
547 } 570 }
548 std::vector<DownloadItem*> Downloads() { 571 std::vector<DownloadItem*> Downloads() {
549 return downloads_; 572 return downloads_;
550 } 573 }
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 private: 637 private:
615 NotificationRegistrar registrar_; 638 NotificationRegistrar registrar_;
616 AutomationProvider* automation_; 639 AutomationProvider* automation_;
617 IPC::Message* reply_message_; 640 IPC::Message* reply_message_;
618 NavigationController* controller_; 641 NavigationController* controller_;
619 642
620 DISALLOW_COPY_AND_ASSIGN(OmniboxAcceptNotificationObserver); 643 DISALLOW_COPY_AND_ASSIGN(OmniboxAcceptNotificationObserver);
621 }; 644 };
622 645
623 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ 646 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider.cc ('k') | chrome/browser/automation/automation_provider_observers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698