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

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

Issue 10033001: Convert printing ui_tests to browser_tests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments Created 8 years, 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 virtual void OnJavascriptBlocked() OVERRIDE; 639 virtual void OnJavascriptBlocked() OVERRIDE;
640 640
641 private: 641 private:
642 base::WeakPtr<AutomationProvider> automation_; 642 base::WeakPtr<AutomationProvider> automation_;
643 scoped_ptr<IPC::Message> reply_message_; 643 scoped_ptr<IPC::Message> reply_message_;
644 bool use_json_interface_; 644 bool use_json_interface_;
645 645
646 DISALLOW_COPY_AND_ASSIGN(DomOperationMessageSender); 646 DISALLOW_COPY_AND_ASSIGN(DomOperationMessageSender);
647 }; 647 };
648 648
649 class DocumentPrintedNotificationObserver
650 : public content::NotificationObserver {
651 public:
652 DocumentPrintedNotificationObserver(AutomationProvider* automation,
653 IPC::Message* reply_message);
654 virtual ~DocumentPrintedNotificationObserver();
655
656 virtual void Observe(int type, const content::NotificationSource& source,
657 const content::NotificationDetails& details);
658
659 private:
660 content::NotificationRegistrar registrar_;
661 base::WeakPtr<AutomationProvider> automation_;
662 bool success_;
663 scoped_ptr<IPC::Message> reply_message_;
664
665 DISALLOW_COPY_AND_ASSIGN(DocumentPrintedNotificationObserver);
666 };
667
668 // Collects METRIC_EVENT_DURATION notifications and keep track of the times. 649 // Collects METRIC_EVENT_DURATION notifications and keep track of the times.
669 class MetricEventDurationObserver : public content::NotificationObserver { 650 class MetricEventDurationObserver : public content::NotificationObserver {
670 public: 651 public:
671 MetricEventDurationObserver(); 652 MetricEventDurationObserver();
672 virtual ~MetricEventDurationObserver(); 653 virtual ~MetricEventDurationObserver();
673 654
674 // Get the duration of an event. Returns -1 if we haven't seen the event. 655 // Get the duration of an event. Returns -1 if we haven't seen the event.
675 int GetEventDurationMs(const std::string& event_name); 656 int GetEventDurationMs(const std::string& event_name);
676 657
677 // NotificationObserver interface. 658 // NotificationObserver interface.
(...skipping 1228 matching lines...) Expand 10 before | Expand all | Expand 10 after
1906 private: 1887 private:
1907 base::WeakPtr<AutomationProvider> automation_; 1888 base::WeakPtr<AutomationProvider> automation_;
1908 scoped_ptr<IPC::Message> reply_message_; 1889 scoped_ptr<IPC::Message> reply_message_;
1909 std::string extension_id_; 1890 std::string extension_id_;
1910 content::NotificationRegistrar registrar_; 1891 content::NotificationRegistrar registrar_;
1911 1892
1912 DISALLOW_COPY_AND_ASSIGN(ExtensionPopupObserver); 1893 DISALLOW_COPY_AND_ASSIGN(ExtensionPopupObserver);
1913 }; 1894 };
1914 1895
1915 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ 1896 #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