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

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

Issue 7006010: Change InfoBar-related notifications to be sourced from a TabContentsWrapper, not a TabContents. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/automation/automation_provider_observers.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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 #pragma once 7 #pragma once
8 8
9 #include <deque> 9 #include <deque>
10 #include <map> 10 #include <map>
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 TabContents* tab_contents_; 691 TabContents* tab_contents_;
692 TranslateInfoBarDelegate* translate_bar_; 692 TranslateInfoBarDelegate* translate_bar_;
693 693
694 DISALLOW_COPY_AND_ASSIGN(TabLanguageDeterminedObserver); 694 DISALLOW_COPY_AND_ASSIGN(TabLanguageDeterminedObserver);
695 }; 695 };
696 696
697 class InfoBarCountObserver : public NotificationObserver { 697 class InfoBarCountObserver : public NotificationObserver {
698 public: 698 public:
699 InfoBarCountObserver(AutomationProvider* automation, 699 InfoBarCountObserver(AutomationProvider* automation,
700 IPC::Message* reply_message, 700 IPC::Message* reply_message,
701 TabContents* tab_contents, 701 TabContentsWrapper* tab_contents,
702 size_t target_count); 702 size_t target_count);
703 virtual ~InfoBarCountObserver(); 703 virtual ~InfoBarCountObserver();
704 704
705 // NotificationObserver interface. 705 // NotificationObserver interface.
706 virtual void Observe(NotificationType type, 706 virtual void Observe(NotificationType type,
707 const NotificationSource& source, 707 const NotificationSource& source,
708 const NotificationDetails& details); 708 const NotificationDetails& details);
709 709
710 private: 710 private:
711 // Checks whether the infobar count matches our target, and if so 711 // Checks whether the infobar count matches our target, and if so
712 // sends the reply message and deletes itself. 712 // sends the reply message and deletes itself.
713 void CheckCount(); 713 void CheckCount();
714 714
715 NotificationRegistrar registrar_; 715 NotificationRegistrar registrar_;
716 base::WeakPtr<AutomationProvider> automation_; 716 base::WeakPtr<AutomationProvider> automation_;
717 scoped_ptr<IPC::Message> reply_message_; 717 scoped_ptr<IPC::Message> reply_message_;
718 TabContents* tab_contents_; 718 TabContentsWrapper* tab_contents_;
719 719
720 const size_t target_count_; 720 const size_t target_count_;
721 721
722 DISALLOW_COPY_AND_ASSIGN(InfoBarCountObserver); 722 DISALLOW_COPY_AND_ASSIGN(InfoBarCountObserver);
723 }; 723 };
724 724
725 #if defined(OS_CHROMEOS) 725 #if defined(OS_CHROMEOS)
726 class LoginObserver : public chromeos::LoginStatusConsumer, 726 class LoginObserver : public chromeos::LoginStatusConsumer,
727 public NotificationObserver { 727 public NotificationObserver {
728 public: 728 public:
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after
1527 // Sends the |reply_message_| to |automation_| indicating we're done. 1527 // Sends the |reply_message_| to |automation_| indicating we're done.
1528 void RunOnUIThread(); 1528 void RunOnUIThread();
1529 1529
1530 base::WeakPtr<AutomationProvider> automation_; 1530 base::WeakPtr<AutomationProvider> automation_;
1531 scoped_ptr<IPC::Message> reply_message_; 1531 scoped_ptr<IPC::Message> reply_message_;
1532 1532
1533 DISALLOW_COPY_AND_ASSIGN(WaitForProcessLauncherThreadToGoIdleObserver); 1533 DISALLOW_COPY_AND_ASSIGN(WaitForProcessLauncherThreadToGoIdleObserver);
1534 }; 1534 };
1535 1535
1536 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ 1536 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/automation/automation_provider_observers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698