OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 #include "chrome/browser/ui/fullscreen/fullscreen_controller.h" | 101 #include "chrome/browser/ui/fullscreen/fullscreen_controller.h" |
102 #include "chrome/browser/ui/fullscreen/fullscreen_exit_bubble_type.h" | 102 #include "chrome/browser/ui/fullscreen/fullscreen_exit_bubble_type.h" |
103 #include "chrome/browser/ui/host_desktop.h" | 103 #include "chrome/browser/ui/host_desktop.h" |
104 #include "chrome/browser/ui/login/login_prompt.h" | 104 #include "chrome/browser/ui/login/login_prompt.h" |
105 #include "chrome/browser/ui/media_stream_infobar_delegate.h" | 105 #include "chrome/browser/ui/media_stream_infobar_delegate.h" |
106 #include "chrome/browser/ui/omnibox/location_bar.h" | 106 #include "chrome/browser/ui/omnibox/location_bar.h" |
107 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h" | 107 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h" |
108 #include "chrome/browser/ui/omnibox/omnibox_view.h" | 108 #include "chrome/browser/ui/omnibox/omnibox_view.h" |
109 #include "chrome/browser/ui/search_engines/keyword_editor_controller.h" | 109 #include "chrome/browser/ui/search_engines/keyword_editor_controller.h" |
110 #include "chrome/browser/ui/startup/startup_types.h" | 110 #include "chrome/browser/ui/startup/startup_types.h" |
111 #include "chrome/browser/view_type_utils.h" | |
112 #include "chrome/common/automation_constants.h" | 111 #include "chrome/common/automation_constants.h" |
113 #include "chrome/common/automation_events.h" | 112 #include "chrome/common/automation_events.h" |
114 #include "chrome/common/automation_id.h" | 113 #include "chrome/common/automation_id.h" |
115 #include "chrome/common/automation_messages.h" | 114 #include "chrome/common/automation_messages.h" |
116 #include "chrome/common/chrome_constants.h" | 115 #include "chrome/common/chrome_constants.h" |
117 #include "chrome/common/chrome_notification_types.h" | 116 #include "chrome/common/chrome_notification_types.h" |
118 #include "chrome/common/chrome_paths.h" | 117 #include "chrome/common/chrome_paths.h" |
119 #include "chrome/common/chrome_switches.h" | 118 #include "chrome/common/chrome_switches.h" |
120 #include "chrome/common/extensions/background_info.h" | 119 #include "chrome/common/extensions/background_info.h" |
121 #include "chrome/common/extensions/extension.h" | 120 #include "chrome/common/extensions/extension.h" |
(...skipping 11 matching lines...) Expand all Loading... |
133 #include "content/public/browser/notification_service.h" | 132 #include "content/public/browser/notification_service.h" |
134 #include "content/public/browser/plugin_service.h" | 133 #include "content/public/browser/plugin_service.h" |
135 #include "content/public/browser/render_process_host.h" | 134 #include "content/public/browser/render_process_host.h" |
136 #include "content/public/browser/render_view_host.h" | 135 #include "content/public/browser/render_view_host.h" |
137 #include "content/public/browser/render_widget_host_view.h" | 136 #include "content/public/browser/render_widget_host_view.h" |
138 #include "content/public/browser/web_contents.h" | 137 #include "content/public/browser/web_contents.h" |
139 #include "content/public/common/child_process_host.h" | 138 #include "content/public/common/child_process_host.h" |
140 #include "content/public/common/common_param_traits.h" | 139 #include "content/public/common/common_param_traits.h" |
141 #include "content/public/common/geoposition.h" | 140 #include "content/public/common/geoposition.h" |
142 #include "content/public/common/ssl_status.h" | 141 #include "content/public/common/ssl_status.h" |
| 142 #include "extensions/browser/view_type_utils.h" |
143 #include "extensions/common/url_pattern.h" | 143 #include "extensions/common/url_pattern.h" |
144 #include "extensions/common/url_pattern_set.h" | 144 #include "extensions/common/url_pattern_set.h" |
145 #include "net/cookies/cookie_store.h" | 145 #include "net/cookies/cookie_store.h" |
146 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 146 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
147 #include "ui/base/events/event_constants.h" | 147 #include "ui/base/events/event_constants.h" |
148 #include "ui/base/keycodes/keyboard_codes.h" | 148 #include "ui/base/keycodes/keyboard_codes.h" |
149 #include "ui/base/ui_base_types.h" | 149 #include "ui/base/ui_base_types.h" |
150 #include "webkit/glue/webdropdata.h" | 150 #include "webkit/glue/webdropdata.h" |
151 #include "webkit/plugins/webplugininfo.h" | 151 #include "webkit/plugins/webplugininfo.h" |
152 | 152 |
(...skipping 2226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2379 view->SetInteger( | 2379 view->SetInteger( |
2380 "render_process_id", | 2380 "render_process_id", |
2381 render_view_host->GetProcess()->GetID()); | 2381 render_view_host->GetProcess()->GetID()); |
2382 view->SetInteger( | 2382 view->SetInteger( |
2383 "render_view_id", | 2383 "render_view_id", |
2384 render_view_host->GetRoutingID()); | 2384 render_view_host->GetRoutingID()); |
2385 item->Set("view", view); | 2385 item->Set("view", view); |
2386 std::string type; | 2386 std::string type; |
2387 WebContents* web_contents = | 2387 WebContents* web_contents = |
2388 WebContents::FromRenderViewHost(render_view_host); | 2388 WebContents::FromRenderViewHost(render_view_host); |
2389 chrome::ViewType view_type = chrome::GetViewType(web_contents); | 2389 extensions::ViewType view_type = extensions::GetViewType(web_contents); |
2390 switch (view_type) { | 2390 switch (view_type) { |
2391 case chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE: | 2391 case extensions::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE: |
2392 type = "EXTENSION_BACKGROUND_PAGE"; | 2392 type = "EXTENSION_BACKGROUND_PAGE"; |
2393 break; | 2393 break; |
2394 case chrome::VIEW_TYPE_EXTENSION_POPUP: | 2394 case extensions::VIEW_TYPE_EXTENSION_POPUP: |
2395 type = "EXTENSION_POPUP"; | 2395 type = "EXTENSION_POPUP"; |
2396 break; | 2396 break; |
2397 case chrome::VIEW_TYPE_EXTENSION_INFOBAR: | 2397 case extensions::VIEW_TYPE_EXTENSION_INFOBAR: |
2398 type = "EXTENSION_INFOBAR"; | 2398 type = "EXTENSION_INFOBAR"; |
2399 break; | 2399 break; |
2400 case chrome::VIEW_TYPE_EXTENSION_DIALOG: | 2400 case extensions::VIEW_TYPE_EXTENSION_DIALOG: |
2401 type = "EXTENSION_DIALOG"; | 2401 type = "EXTENSION_DIALOG"; |
2402 break; | 2402 break; |
2403 case chrome::VIEW_TYPE_APP_SHELL: | 2403 case extensions::VIEW_TYPE_APP_SHELL: |
2404 type = "APP_SHELL"; | 2404 type = "APP_SHELL"; |
2405 break; | 2405 break; |
2406 case chrome::VIEW_TYPE_PANEL: | 2406 case extensions::VIEW_TYPE_PANEL: |
2407 type = "PANEL"; | 2407 type = "PANEL"; |
2408 break; | 2408 break; |
2409 default: | 2409 default: |
2410 type = "unknown"; | 2410 type = "unknown"; |
2411 break; | 2411 break; |
2412 } | 2412 } |
2413 item->SetString("view_type", type); | 2413 item->SetString("view_type", type); |
2414 item->SetString("url", web_contents->GetURL().spec()); | 2414 item->SetString("url", web_contents->GetURL().spec()); |
2415 item->SetBoolean("loaded", !render_view_host->IsLoading()); | 2415 item->SetBoolean("loaded", !render_view_host->IsLoading()); |
2416 extension_views->Append(item); | 2416 extension_views->Append(item); |
(...skipping 3502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5919 if (g_browser_process) | 5919 if (g_browser_process) |
5920 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); | 5920 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); |
5921 } | 5921 } |
5922 | 5922 |
5923 void TestingAutomationProvider::EnsureTabSelected(Browser* browser, | 5923 void TestingAutomationProvider::EnsureTabSelected(Browser* browser, |
5924 WebContents* tab) { | 5924 WebContents* tab) { |
5925 TabStripModel* tab_strip = browser->tab_strip_model(); | 5925 TabStripModel* tab_strip = browser->tab_strip_model(); |
5926 if (tab_strip->GetActiveWebContents() != tab) | 5926 if (tab_strip->GetActiveWebContents() != tab) |
5927 tab_strip->ActivateTabAt(tab_strip->GetIndexOfWebContents(tab), true); | 5927 tab_strip->ActivateTabAt(tab_strip->GetIndexOfWebContents(tab), true); |
5928 } | 5928 } |
OLD | NEW |