OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/renderer_host/render_view_host.h" | 5 #include "chrome/browser/renderer_host/render_view_host.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 #include "third_party/skia/include/core/SkBitmap.h" | 46 #include "third_party/skia/include/core/SkBitmap.h" |
47 #include "third_party/WebKit/WebKit/chromium/public/WebFindOptions.h" | 47 #include "third_party/WebKit/WebKit/chromium/public/WebFindOptions.h" |
48 #include "webkit/glue/context_menu.h" | 48 #include "webkit/glue/context_menu.h" |
49 #include "webkit/glue/dom_operations.h" | 49 #include "webkit/glue/dom_operations.h" |
50 #include "webkit/glue/form_data.h" | 50 #include "webkit/glue/form_data.h" |
51 #include "webkit/glue/form_field.h" | 51 #include "webkit/glue/form_field.h" |
52 #include "webkit/glue/password_form_dom_manager.h" | 52 #include "webkit/glue/password_form_dom_manager.h" |
53 #include "webkit/glue/webaccessibility.h" | 53 #include "webkit/glue/webaccessibility.h" |
54 #include "webkit/glue/webdropdata.h" | 54 #include "webkit/glue/webdropdata.h" |
55 | 55 |
56 #if defined(OS_WIN) | |
57 // TODO(port): accessibility not yet implemented. See http://crbug.com/8288. | |
58 #include "chrome/browser/browser_accessibility_manager_win.h" | |
59 #endif | |
60 | |
61 using base::TimeDelta; | 56 using base::TimeDelta; |
62 using webkit_glue::FormData; | 57 using webkit_glue::FormData; |
63 using webkit_glue::PasswordForm; | 58 using webkit_glue::PasswordForm; |
64 using webkit_glue::PasswordFormDomManager; | 59 using webkit_glue::PasswordFormDomManager; |
65 using webkit_glue::PasswordFormFillData; | 60 using webkit_glue::PasswordFormFillData; |
66 using webkit_glue::WebApplicationInfo; | 61 using webkit_glue::WebApplicationInfo; |
67 using WebKit::WebConsoleMessage; | 62 using WebKit::WebConsoleMessage; |
68 using WebKit::WebDragOperation; | 63 using WebKit::WebDragOperation; |
69 using WebKit::WebDragOperationNone; | 64 using WebKit::WebDragOperationNone; |
70 using WebKit::WebDragOperationsMask; | 65 using WebKit::WebDragOperationsMask; |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 navigations_suspended_(false), | 123 navigations_suspended_(false), |
129 suspended_nav_message_(NULL), | 124 suspended_nav_message_(NULL), |
130 run_modal_reply_msg_(NULL), | 125 run_modal_reply_msg_(NULL), |
131 is_waiting_for_beforeunload_ack_(false), | 126 is_waiting_for_beforeunload_ack_(false), |
132 is_waiting_for_unload_ack_(false), | 127 is_waiting_for_unload_ack_(false), |
133 unload_ack_is_for_cross_site_transition_(false), | 128 unload_ack_is_for_cross_site_transition_(false), |
134 are_javascript_messages_suppressed_(false), | 129 are_javascript_messages_suppressed_(false), |
135 sudden_termination_allowed_(false), | 130 sudden_termination_allowed_(false), |
136 session_storage_namespace_id_(session_storage_namespace_id), | 131 session_storage_namespace_id_(session_storage_namespace_id), |
137 is_extension_process_(false), | 132 is_extension_process_(false), |
138 autofill_query_id_(0) { | 133 autofill_query_id_(0), |
| 134 save_accessibility_tree_for_testing_(false) { |
139 DCHECK(instance_); | 135 DCHECK(instance_); |
140 DCHECK(delegate_); | 136 DCHECK(delegate_); |
141 } | 137 } |
142 | 138 |
143 RenderViewHost::~RenderViewHost() { | 139 RenderViewHost::~RenderViewHost() { |
144 delegate()->RenderViewDeleted(this); | 140 delegate()->RenderViewDeleted(this); |
145 | 141 |
146 // Be sure to clean up any leftover state from cross-site requests. | 142 // Be sure to clean up any leftover state from cross-site requests. |
147 Singleton<CrossSiteRequestManager>()->SetHasPendingCrossSiteRequest( | 143 Singleton<CrossSiteRequestManager>()->SetHasPendingCrossSiteRequest( |
148 process()->id(), routing_id(), false); | 144 process()->id(), routing_id(), false); |
(...skipping 1823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1972 | 1968 |
1973 void RenderViewHost::OnAccessibilityObjectStateChange(int acc_obj_id) { | 1969 void RenderViewHost::OnAccessibilityObjectStateChange(int acc_obj_id) { |
1974 view()->OnAccessibilityObjectStateChange(acc_obj_id); | 1970 view()->OnAccessibilityObjectStateChange(acc_obj_id); |
1975 } | 1971 } |
1976 | 1972 |
1977 void RenderViewHost::OnAccessibilityTree( | 1973 void RenderViewHost::OnAccessibilityTree( |
1978 const webkit_glue::WebAccessibility& tree) { | 1974 const webkit_glue::WebAccessibility& tree) { |
1979 if (view()) | 1975 if (view()) |
1980 view()->UpdateAccessibilityTree(tree); | 1976 view()->UpdateAccessibilityTree(tree); |
1981 | 1977 |
| 1978 if (save_accessibility_tree_for_testing_) |
| 1979 accessibility_tree_ = tree; |
| 1980 |
1982 NotificationService::current()->Notify( | 1981 NotificationService::current()->Notify( |
1983 NotificationType::RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED, | 1982 NotificationType::RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED, |
1984 Source<RenderViewHost>(this), | 1983 Source<RenderViewHost>(this), |
1985 NotificationService::NoDetails()); | 1984 NotificationService::NoDetails()); |
1986 } | 1985 } |
1987 | 1986 |
1988 void RenderViewHost::OnCSSInserted() { | 1987 void RenderViewHost::OnCSSInserted() { |
1989 delegate_->DidInsertCSS(); | 1988 delegate_->DidInsertCSS(); |
1990 } | 1989 } |
1991 | 1990 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2039 RenderViewHostDelegate::ContentSettings* content_settings_delegate = | 2038 RenderViewHostDelegate::ContentSettings* content_settings_delegate = |
2040 delegate_->GetContentSettingsDelegate(); | 2039 delegate_->GetContentSettingsDelegate(); |
2041 if (content_settings_delegate) | 2040 if (content_settings_delegate) |
2042 content_settings_delegate->OnWebDatabaseAccessed( | 2041 content_settings_delegate->OnWebDatabaseAccessed( |
2043 url, name, display_name, estimated_size, blocked_by_policy); | 2042 url, name, display_name, estimated_size, blocked_by_policy); |
2044 } | 2043 } |
2045 | 2044 |
2046 void RenderViewHost::OnSetDisplayingPDFContent() { | 2045 void RenderViewHost::OnSetDisplayingPDFContent() { |
2047 delegate_->SetDisplayingPDFContent(); | 2046 delegate_->SetDisplayingPDFContent(); |
2048 } | 2047 } |
OLD | NEW |