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 "chrome/browser/renderer_host/render_widget_host_view_win.h" | 5 #include "chrome/browser/renderer_host/render_widget_host_view_win.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 being_destroyed_(false), | 236 being_destroyed_(false), |
237 tooltip_hwnd_(NULL), | 237 tooltip_hwnd_(NULL), |
238 tooltip_showing_(false), | 238 tooltip_showing_(false), |
239 shutdown_factory_(this), | 239 shutdown_factory_(this), |
240 parent_hwnd_(NULL), | 240 parent_hwnd_(NULL), |
241 is_loading_(false), | 241 is_loading_(false), |
242 overlay_color_(0), | 242 overlay_color_(0), |
243 text_input_type_(ui::TEXT_INPUT_TYPE_NONE) { | 243 text_input_type_(ui::TEXT_INPUT_TYPE_NONE) { |
244 render_widget_host_->SetView(this); | 244 render_widget_host_->SetView(this); |
245 registrar_.Add(this, | 245 registrar_.Add(this, |
246 NotificationType::RENDERER_PROCESS_TERMINATED, | 246 content::NOTIFICATION_RENDERER_PROCESS_TERMINATED, |
247 NotificationService::AllSources()); | 247 NotificationService::AllSources()); |
248 } | 248 } |
249 | 249 |
250 RenderWidgetHostViewWin::~RenderWidgetHostViewWin() { | 250 RenderWidgetHostViewWin::~RenderWidgetHostViewWin() { |
251 ResetTooltip(); | 251 ResetTooltip(); |
252 } | 252 } |
253 | 253 |
254 void RenderWidgetHostViewWin::CreateWnd(HWND parent) { | 254 void RenderWidgetHostViewWin::CreateWnd(HWND parent) { |
255 Create(parent); // ATL function to create the window. | 255 Create(parent); // ATL function to create the window. |
256 } | 256 } |
(...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1453 webkit_glue::WebAccessibility empty_document; | 1453 webkit_glue::WebAccessibility empty_document; |
1454 empty_document.role = WebAccessibility::ROLE_DOCUMENT; | 1454 empty_document.role = WebAccessibility::ROLE_DOCUMENT; |
1455 empty_document.state = 0; | 1455 empty_document.state = 0; |
1456 browser_accessibility_manager_.reset( | 1456 browser_accessibility_manager_.reset( |
1457 BrowserAccessibilityManager::Create(m_hWnd, empty_document, this)); | 1457 BrowserAccessibilityManager::Create(m_hWnd, empty_document, this)); |
1458 } | 1458 } |
1459 | 1459 |
1460 browser_accessibility_manager_->OnAccessibilityNotifications(params); | 1460 browser_accessibility_manager_->OnAccessibilityNotifications(params); |
1461 } | 1461 } |
1462 | 1462 |
1463 void RenderWidgetHostViewWin::Observe(NotificationType type, | 1463 void RenderWidgetHostViewWin::Observe(int type, |
1464 const NotificationSource& source, | 1464 const NotificationSource& source, |
1465 const NotificationDetails& details) { | 1465 const NotificationDetails& details) { |
1466 DCHECK(type == NotificationType::RENDERER_PROCESS_TERMINATED); | 1466 DCHECK(type == content::NOTIFICATION_RENDERER_PROCESS_TERMINATED); |
1467 | 1467 |
1468 // Get the RenderProcessHost that posted this notification, and exit | 1468 // Get the RenderProcessHost that posted this notification, and exit |
1469 // if it's not the one associated with this host view. | 1469 // if it's not the one associated with this host view. |
1470 RenderProcessHost* render_process_host = | 1470 RenderProcessHost* render_process_host = |
1471 Source<RenderProcessHost>(source).ptr(); | 1471 Source<RenderProcessHost>(source).ptr(); |
1472 DCHECK(render_process_host); | 1472 DCHECK(render_process_host); |
1473 if (!render_widget_host_ || | 1473 if (!render_widget_host_ || |
1474 render_process_host != render_widget_host_->process()) | 1474 render_process_host != render_widget_host_->process()) |
1475 return; | 1475 return; |
1476 | 1476 |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1812 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( | 1812 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( |
1813 gfx::NativeView native_view) { | 1813 gfx::NativeView native_view) { |
1814 if (views::Widget::IsPureViews()) { | 1814 if (views::Widget::IsPureViews()) { |
1815 // TODO(beng): Figure out what to do for Windows/v.o.v. | 1815 // TODO(beng): Figure out what to do for Windows/v.o.v. |
1816 return NULL; | 1816 return NULL; |
1817 } | 1817 } |
1818 return ::IsWindow(native_view) ? | 1818 return ::IsWindow(native_view) ? |
1819 reinterpret_cast<RenderWidgetHostView*>( | 1819 reinterpret_cast<RenderWidgetHostView*>( |
1820 ViewProp::GetValue(native_view, kRenderWidgetHostViewKey)) : NULL; | 1820 ViewProp::GetValue(native_view, kRenderWidgetHostViewKey)) : NULL; |
1821 } | 1821 } |
OLD | NEW |