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

Side by Side Diff: chrome/browser/automation/automation_tab_helper.cc

Issue 10963061: Switch AutomationTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 2 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) 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 #include "chrome/browser/automation/automation_tab_helper.h" 5 #include "chrome/browser/automation/automation_tab_helper.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "chrome/common/automation_messages.h" 9 #include "chrome/common/automation_messages.h"
10 #include "content/public/browser/web_contents.h" 10 #include "content/public/browser/web_contents.h"
11 #include "ipc/ipc_message.h" 11 #include "ipc/ipc_message.h"
12 #include "ipc/ipc_message_macros.h" 12 #include "ipc/ipc_message_macros.h"
13 #include "ui/gfx/size.h" 13 #include "ui/gfx/size.h"
14 14
15 using content::WebContents; 15 using content::WebContents;
16 16
17 int AutomationTabHelper::kUserDataKey;
18
17 TabEventObserver::TabEventObserver() { } 19 TabEventObserver::TabEventObserver() { }
18 20
19 TabEventObserver::~TabEventObserver() { 21 TabEventObserver::~TabEventObserver() {
20 for (size_t i = 0; i < event_sources_.size(); ++i) { 22 for (size_t i = 0; i < event_sources_.size(); ++i) {
21 if (event_sources_[i]) 23 if (event_sources_[i])
22 event_sources_[i]->RemoveObserver(this); 24 event_sources_[i]->RemoveObserver(this);
23 } 25 }
24 } 26 }
25 27
26 void TabEventObserver::StartObserving(AutomationTabHelper* tab_helper) { 28 void TabEventObserver::StartObserving(AutomationTabHelper* tab_helper) {
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 // It is possible that we did not track the redirect becasue it had a non-zero 165 // It is possible that we did not track the redirect becasue it had a non-zero
164 // delay. See the comment in |OnWillPerformClientRedirect|. 166 // delay. See the comment in |OnWillPerformClientRedirect|.
165 if (iter != pending_client_redirects_.end()) { 167 if (iter != pending_client_redirects_.end()) {
166 pending_client_redirects_.erase(iter); 168 pending_client_redirects_.erase(iter);
167 if (!has_pending_loads()) { 169 if (!has_pending_loads()) {
168 FOR_EACH_OBSERVER(TabEventObserver, observers_, 170 FOR_EACH_OBSERVER(TabEventObserver, observers_,
169 OnNoMorePendingLoads(web_contents())); 171 OnNoMorePendingLoads(web_contents()));
170 } 172 }
171 } 173 }
172 } 174 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_tab_helper.h ('k') | chrome/browser/automation/automation_tab_helper_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698