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

Unified Diff: content/browser/renderer_host/render_widget_host_view_win.cc

Issue 10073002: TabContents -> WebContentsImpl, part 11. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: missed a few Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_view_win.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_win.cc b/content/browser/renderer_host/render_widget_host_view_win.cc
index 8ee1da299c93bd313e315e7fe4c9b358c2fab692..daeb53834adc88bd1dced92a9197b49f64babdf8 100644
--- a/content/browser/renderer_host/render_widget_host_view_win.cc
+++ b/content/browser/renderer_host/render_widget_host_view_win.cc
@@ -402,13 +402,13 @@ void RenderWidgetHostViewWin::DidBecomeSelected() {
if (!is_hidden_)
return;
- if (tab_switch_paint_time_.is_null())
- tab_switch_paint_time_ = TimeTicks::Now();
+ if (web_contents_switch_paint_time_.is_null())
+ web_contents_switch_paint_time_ = TimeTicks::Now();
is_hidden_ = false;
EnsureTooltip();
- // |render_widget_host_| may be NULL if the TabContents is in the process of
- // closing.
+ // |render_widget_host_| may be NULL if the WebContentsImpl is in the process
+ // of closing.
if (render_widget_host_)
render_widget_host_->WasRestored();
}
@@ -1176,14 +1176,14 @@ void RenderWidgetHostViewWin::OnPaint(HDC unused_dc) {
// time the backing store is NULL...
whiteout_start_time_ = TimeTicks();
}
- if (!tab_switch_paint_time_.is_null()) {
- TimeDelta tab_switch_paint_duration = TimeTicks::Now() -
- tab_switch_paint_time_;
+ if (!web_contents_switch_paint_time_.is_null()) {
+ TimeDelta web_contents_switch_paint_duration = TimeTicks::Now() -
+ web_contents_switch_paint_time_;
UMA_HISTOGRAM_TIMES("MPArch.RWH_TabSwitchPaintDuration",
- tab_switch_paint_duration);
- // Reset tab_switch_paint_time_ to 0 so future tab selections are
+ web_contents_switch_paint_duration);
+ // Reset contents_switch_paint_time_ to 0 so future tab selections are
// recorded.
- tab_switch_paint_time_ = TimeTicks();
+ web_contents_switch_paint_time_ = TimeTicks();
}
} else {
DrawBackground(paint_dc.m_ps.rcPaint, &paint_dc);
@@ -1530,14 +1530,14 @@ LRESULT RenderWidgetHostViewWin::OnMouseEvent(UINT message, WPARAM wparam,
}
// TODO(jcampan): I am not sure if we should forward the message to the
- // TabContents first in the case of popups. If we do, we would need to
- // convert the click from the popup window coordinates to the TabContents'
+ // WebContentsImpl first in the case of popups. If we do, we would need to
+ // convert the click from the popup window coordinates to the WebContentsImpl'
// window coordinates. For now we don't forward the message in that case to
// address bug #907474.
// Note: GetParent() on popup windows returns the top window and not the
// parent the window was created with (the parent and the owner of the popup
// is the first non-child view of the view that was specified to the create
- // call). So the TabContents window would have to be specified to the
+ // call). So the WebContentsImpl's window would have to be specified to the
// RenderViewHostHWND as there is no way to retrieve it from the HWND.
// Don't forward if the container is a popup or fullscreen widget.
@@ -1552,7 +1552,7 @@ LRESULT RenderWidgetHostViewWin::OnMouseEvent(UINT message, WPARAM wparam,
// Fall through.
case WM_MOUSEMOVE:
case WM_MOUSELEAVE: {
- // Give the TabContents first crack at the message. It may want to
+ // Give the WebContentsImpl first crack at the message. It may want to
// prevent forwarding to the renderer if some higher level browser
// functionality is invoked.
LPARAM parent_msg_lparam = lparam;
@@ -1696,8 +1696,8 @@ LRESULT RenderWidgetHostViewWin::OnWheelEvent(UINT message, WPARAM wparam,
}
// This is a bit of a hack, but will work for now since we don't want to
- // pollute this object with TabContents-specific functionality...
- bool handled_by_TabContents = false;
+ // pollute this object with WebContentsImpl-specific functionality...
+ bool handled_by_WebContentsImpl = false;
if (!is_fullscreen_ && GetParent()) {
// Use a special reflected message to break recursion. If we send
// WM_MOUSEWHEEL, the focus manager subclass of web contents will
@@ -1708,12 +1708,12 @@ LRESULT RenderWidgetHostViewWin::OnWheelEvent(UINT message, WPARAM wparam,
new_message.wParam = wparam;
new_message.lParam = lparam;
- handled_by_TabContents =
+ handled_by_WebContentsImpl =
!!::SendMessage(GetParent(), base::win::kReflectedMessage, 0,
reinterpret_cast<LPARAM>(&new_message));
}
- if (!handled_by_TabContents && render_widget_host_) {
+ if (!handled_by_WebContentsImpl && render_widget_host_) {
render_widget_host_->ForwardWheelEvent(
WebInputEventFactory::mouseWheelEvent(m_hWnd, message, wparam,
lparam));

Powered by Google App Engine
This is Rietveld 408576698