| OLD | NEW |
| 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.h" | 5 #include "chrome/browser/automation/automation_provider.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 initial_tab_loads_complete_(false), | 110 initial_tab_loads_complete_(false), |
| 111 network_library_initialized_(true) { | 111 network_library_initialized_(true) { |
| 112 TRACE_EVENT_BEGIN_ETW("AutomationProvider::AutomationProvider", 0, ""); | 112 TRACE_EVENT_BEGIN_ETW("AutomationProvider::AutomationProvider", 0, ""); |
| 113 | 113 |
| 114 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 114 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 115 | 115 |
| 116 browser_tracker_.reset(new AutomationBrowserTracker(this)); | 116 browser_tracker_.reset(new AutomationBrowserTracker(this)); |
| 117 extension_tracker_.reset(new AutomationExtensionTracker(this)); | 117 extension_tracker_.reset(new AutomationExtensionTracker(this)); |
| 118 tab_tracker_.reset(new AutomationTabTracker(this)); | 118 tab_tracker_.reset(new AutomationTabTracker(this)); |
| 119 window_tracker_.reset(new AutomationWindowTracker(this)); | 119 window_tracker_.reset(new AutomationWindowTracker(this)); |
| 120 new_tab_ui_load_observer_.reset(new NewTabUILoadObserver(this)); | 120 new_tab_ui_load_observer_.reset(new NewTabUILoadObserver(this, profile)); |
| 121 metric_event_duration_observer_.reset(new MetricEventDurationObserver()); | 121 metric_event_duration_observer_.reset(new MetricEventDurationObserver()); |
| 122 extension_test_result_observer_.reset( | 122 extension_test_result_observer_.reset( |
| 123 new ExtensionTestResultNotificationObserver(this)); | 123 new ExtensionTestResultNotificationObserver(this)); |
| 124 g_browser_process->AddRefModule(); | 124 g_browser_process->AddRefModule(); |
| 125 | 125 |
| 126 TRACE_EVENT_END_ETW("AutomationProvider::AutomationProvider", 0, ""); | 126 TRACE_EVENT_END_ETW("AutomationProvider::AutomationProvider", 0, ""); |
| 127 } | 127 } |
| 128 | 128 |
| 129 AutomationProvider::~AutomationProvider() { | 129 AutomationProvider::~AutomationProvider() { |
| 130 if (channel_.get()) | 130 if (channel_.get()) |
| (...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 941 } | 941 } |
| 942 } | 942 } |
| 943 } | 943 } |
| 944 | 944 |
| 945 void AutomationProvider::SaveAsAsync(int tab_handle) { | 945 void AutomationProvider::SaveAsAsync(int tab_handle) { |
| 946 NavigationController* tab = NULL; | 946 NavigationController* tab = NULL; |
| 947 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); | 947 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); |
| 948 if (tab_contents) | 948 if (tab_contents) |
| 949 tab_contents->OnSavePage(); | 949 tab_contents->OnSavePage(); |
| 950 } | 950 } |
| OLD | NEW |