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

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

Issue 7322004: DevTools: devtools manager should know nothing about DevToolsWindow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed Created 9 years, 5 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/extensions/extensions_ui.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 #include "chrome/browser/automation/testing_automation_provider.h" 5 #include "chrome/browser/automation/testing_automation_provider.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 #include "chrome/common/automation_messages.h" 88 #include "chrome/common/automation_messages.h"
89 #include "chrome/common/chrome_constants.h" 89 #include "chrome/common/chrome_constants.h"
90 #include "chrome/common/chrome_paths.h" 90 #include "chrome/common/chrome_paths.h"
91 #include "chrome/common/chrome_switches.h" 91 #include "chrome/common/chrome_switches.h"
92 #include "chrome/common/extensions/extension.h" 92 #include "chrome/common/extensions/extension.h"
93 #include "chrome/common/extensions/url_pattern.h" 93 #include "chrome/common/extensions/url_pattern.h"
94 #include "chrome/common/extensions/url_pattern_set.h" 94 #include "chrome/common/extensions/url_pattern_set.h"
95 #include "chrome/common/pref_names.h" 95 #include "chrome/common/pref_names.h"
96 #include "chrome/common/render_messages.h" 96 #include "chrome/common/render_messages.h"
97 #include "chrome/common/url_constants.h" 97 #include "chrome/common/url_constants.h"
98 #include "content/browser/debugger/devtools_manager.h" 98 #include "content/browser/debugger/devtools_window.h"
99 #include "content/browser/renderer_host/render_process_host.h" 99 #include "content/browser/renderer_host/render_process_host.h"
100 #include "content/browser/renderer_host/render_view_host.h" 100 #include "content/browser/renderer_host/render_view_host.h"
101 #include "content/browser/tab_contents/interstitial_page.h" 101 #include "content/browser/tab_contents/interstitial_page.h"
102 #include "content/common/common_param_traits.h" 102 #include "content/common/common_param_traits.h"
103 #include "content/common/notification_service.h" 103 #include "content/common/notification_service.h"
104 #include "net/base/cookie_store.h" 104 #include "net/base/cookie_store.h"
105 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" 105 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
106 #include "ui/base/events.h" 106 #include "ui/base/events.h"
107 #include "ui/base/keycodes/keyboard_codes.h" 107 #include "ui/base/keycodes/keyboard_codes.h"
108 #include "ui/base/message_box_flags.h" 108 #include "ui/base/message_box_flags.h"
(...skipping 1194 matching lines...) Expand 10 before | Expand all | Expand 10 after
1303 } 1303 }
1304 } 1304 }
1305 1305
1306 void TestingAutomationProvider::HandleInspectElementRequest( 1306 void TestingAutomationProvider::HandleInspectElementRequest(
1307 int handle, int x, int y, IPC::Message* reply_message) { 1307 int handle, int x, int y, IPC::Message* reply_message) {
1308 TabContents* tab_contents = GetTabContentsForHandle(handle, NULL); 1308 TabContents* tab_contents = GetTabContentsForHandle(handle, NULL);
1309 if (tab_contents) { 1309 if (tab_contents) {
1310 DCHECK(!reply_message_); 1310 DCHECK(!reply_message_);
1311 reply_message_ = reply_message; 1311 reply_message_ = reply_message;
1312 1312
1313 DevToolsManager::GetInstance()->InspectElement( 1313 DevToolsWindow::InspectElement(tab_contents->render_view_host(), x, y);
1314 tab_contents->render_view_host(), x, y);
1315 } else { 1314 } else {
1316 AutomationMsg_InspectElement::WriteReplyParams(reply_message, -1); 1315 AutomationMsg_InspectElement::WriteReplyParams(reply_message, -1);
1317 Send(reply_message); 1316 Send(reply_message);
1318 } 1317 }
1319 } 1318 }
1320 1319
1321 void TestingAutomationProvider::GetDownloadDirectory( 1320 void TestingAutomationProvider::GetDownloadDirectory(
1322 int handle, FilePath* download_directory) { 1321 int handle, FilePath* download_directory) {
1323 if (tab_tracker_->ContainsHandle(handle)) { 1322 if (tab_tracker_->ContainsHandle(handle)) {
1324 NavigationController* tab = tab_tracker_->GetResource(handle); 1323 NavigationController* tab = tab_tracker_->GetResource(handle);
(...skipping 4724 matching lines...) Expand 10 before | Expand all | Expand 10 after
6049 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl); 6048 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl);
6050 6049
6051 Send(reply_message_); 6050 Send(reply_message_);
6052 redirect_query_ = 0; 6051 redirect_query_ = 0;
6053 reply_message_ = NULL; 6052 reply_message_ = NULL;
6054 } 6053 }
6055 6054
6056 void TestingAutomationProvider::OnRemoveProvider() { 6055 void TestingAutomationProvider::OnRemoveProvider() {
6057 AutomationProviderList::GetInstance()->RemoveProvider(this); 6056 AutomationProviderList::GetInstance()->RemoveProvider(this);
6058 } 6057 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extensions_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698