OLD | NEW |
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 #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 "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "app/message_box_flags.h" | 10 #include "app/message_box_flags.h" |
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1150 Browser* browser = browser_tracker_->GetResource(handle); | 1150 Browser* browser = browser_tracker_->GetResource(handle); |
1151 browser->FindInPage(false, false); | 1151 browser->FindInPage(false, false); |
1152 } | 1152 } |
1153 } | 1153 } |
1154 | 1154 |
1155 void AutomationProvider::GetFindWindowVisibility(int handle, bool* visible) { | 1155 void AutomationProvider::GetFindWindowVisibility(int handle, bool* visible) { |
1156 *visible = false; | 1156 *visible = false; |
1157 Browser* browser = browser_tracker_->GetResource(handle); | 1157 Browser* browser = browser_tracker_->GetResource(handle); |
1158 if (browser) { | 1158 if (browser) { |
1159 FindBarTesting* find_bar = | 1159 FindBarTesting* find_bar = |
1160 browser->find_bar()->find_bar()->GetFindBarTesting(); | 1160 browser->GetFindBarController()->find_bar()->GetFindBarTesting(); |
1161 find_bar->GetFindBarWindowInfo(NULL, visible); | 1161 find_bar->GetFindBarWindowInfo(NULL, visible); |
1162 } | 1162 } |
1163 } | 1163 } |
1164 | 1164 |
1165 void AutomationProvider::HandleFindWindowLocationRequest(int handle, int* x, | 1165 void AutomationProvider::HandleFindWindowLocationRequest(int handle, int* x, |
1166 int* y) { | 1166 int* y) { |
1167 gfx::Point position(0, 0); | 1167 gfx::Point position(0, 0); |
1168 bool visible = false; | 1168 bool visible = false; |
1169 if (browser_tracker_->ContainsHandle(handle)) { | 1169 if (browser_tracker_->ContainsHandle(handle)) { |
1170 Browser* browser = browser_tracker_->GetResource(handle); | 1170 Browser* browser = browser_tracker_->GetResource(handle); |
1171 FindBarTesting* find_bar = | 1171 FindBarTesting* find_bar = |
1172 browser->find_bar()->find_bar()->GetFindBarTesting(); | 1172 browser->GetFindBarController()->find_bar()->GetFindBarTesting(); |
1173 find_bar->GetFindBarWindowInfo(&position, &visible); | 1173 find_bar->GetFindBarWindowInfo(&position, &visible); |
1174 } | 1174 } |
1175 | 1175 |
1176 *x = position.x(); | 1176 *x = position.x(); |
1177 *y = position.y(); | 1177 *y = position.y(); |
1178 } | 1178 } |
1179 | 1179 |
1180 void AutomationProvider::HandleInspectElementRequest( | 1180 void AutomationProvider::HandleInspectElementRequest( |
1181 int handle, int x, int y, IPC::Message* reply_message) { | 1181 int handle, int x, int y, IPC::Message* reply_message) { |
1182 TabContents* tab_contents = GetTabContentsForHandle(handle, NULL); | 1182 TabContents* tab_contents = GetTabContentsForHandle(handle, NULL); |
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2180 reply_message); | 2180 reply_message); |
2181 | 2181 |
2182 profile_->GetExtensionsService()->LoadExtension(extension_dir); | 2182 profile_->GetExtensionsService()->LoadExtension(extension_dir); |
2183 profile_->GetUserScriptMaster()->AddWatchedPath(extension_dir); | 2183 profile_->GetUserScriptMaster()->AddWatchedPath(extension_dir); |
2184 } else { | 2184 } else { |
2185 AutomationMsg_LoadExpandedExtension::WriteReplyParams( | 2185 AutomationMsg_LoadExpandedExtension::WriteReplyParams( |
2186 reply_message, AUTOMATION_MSG_EXTENSION_INSTALL_FAILED); | 2186 reply_message, AUTOMATION_MSG_EXTENSION_INSTALL_FAILED); |
2187 Send(reply_message); | 2187 Send(reply_message); |
2188 } | 2188 } |
2189 } | 2189 } |
OLD | NEW |