| OLD | NEW |
| 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "content/common/view_messages.h" | 6 #include "content/common/view_messages.h" |
| 7 #include "content/public/common/content_switches.h" | 7 #include "content/public/common/content_switches.h" |
| 8 #include "content/renderer/render_view_impl.h" | 8 #include "content/renderer/render_view_impl.h" |
| 9 #include "content/renderer/renderer_accessibility.h" | 9 #include "content/renderer/renderer_accessibility.h" |
| 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObjec
t.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObjec
t.h" |
| (...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 render_view()->GetWebView()->clearFocusedNode(); | 507 render_view()->GetWebView()->clearFocusedNode(); |
| 508 else | 508 else |
| 509 obj.setFocused(true); | 509 obj.setFocused(true); |
| 510 } | 510 } |
| 511 | 511 |
| 512 bool RendererAccessibility::ShouldIncludeChildren( | 512 bool RendererAccessibility::ShouldIncludeChildren( |
| 513 const RendererAccessibility::Notification& notification) { | 513 const RendererAccessibility::Notification& notification) { |
| 514 WebKit::WebAccessibilityNotification type = notification.type; | 514 WebKit::WebAccessibilityNotification type = notification.type; |
| 515 if (type == WebKit::WebAccessibilityNotificationChildrenChanged || | 515 if (type == WebKit::WebAccessibilityNotificationChildrenChanged || |
| 516 type == WebKit::WebAccessibilityNotificationLoadComplete || | 516 type == WebKit::WebAccessibilityNotificationLoadComplete || |
| 517 type == WebKit::WebAccessibilityNotificationLiveRegionChanged) { | 517 type == WebKit::WebAccessibilityNotificationLiveRegionChanged || |
| 518 type == WebKit::WebAccessibilityNotificationSelectedChildrenChanged) { |
| 518 return true; | 519 return true; |
| 519 } | 520 } |
| 520 return false; | 521 return false; |
| 521 } | 522 } |
| 522 | 523 |
| 523 WebDocument RendererAccessibility::GetMainDocument() { | 524 WebDocument RendererAccessibility::GetMainDocument() { |
| 524 WebView* view = render_view()->GetWebView(); | 525 WebView* view = render_view()->GetWebView(); |
| 525 WebFrame* main_frame = view ? view->mainFrame() : NULL; | 526 WebFrame* main_frame = view ? view->mainFrame() : NULL; |
| 526 | 527 |
| 527 if (main_frame) | 528 if (main_frame) |
| 528 return main_frame->document(); | 529 return main_frame->document(); |
| 529 else | 530 else |
| 530 return WebDocument(); | 531 return WebDocument(); |
| 531 } | 532 } |
| OLD | NEW |