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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 2425923003: Replaced is_null() with is_valid in SurfaceId and related classes. (Closed)
Patch Set: Removed added printf statements; LocalFrameId::is_valid() no longer checks if nonce is 0. Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 2016 matching lines...) Expand 10 before | Expand all | Expand 10 after
2027 // |point| from DIPs to pixels before hittesting. 2027 // |point| from DIPs to pixels before hittesting.
2028 gfx::Point point_in_pixels = 2028 gfx::Point point_in_pixels =
2029 gfx::ConvertPointToPixel(device_scale_factor_, point); 2029 gfx::ConvertPointToPixel(device_scale_factor_, point);
2030 cc::SurfaceId id = delegated_frame_host_->SurfaceIdAtPoint( 2030 cc::SurfaceId id = delegated_frame_host_->SurfaceIdAtPoint(
2031 delegate, point_in_pixels, transformed_point); 2031 delegate, point_in_pixels, transformed_point);
2032 *transformed_point = 2032 *transformed_point =
2033 gfx::ConvertPointToDIP(device_scale_factor_, *transformed_point); 2033 gfx::ConvertPointToDIP(device_scale_factor_, *transformed_point);
2034 2034
2035 // It is possible that the renderer has not yet produced a surface, in which 2035 // It is possible that the renderer has not yet produced a surface, in which
2036 // case we return our current namespace. 2036 // case we return our current namespace.
2037 if (id.is_null()) 2037 if (!id.is_valid())
2038 return GetFrameSinkId(); 2038 return GetFrameSinkId();
2039 return id.frame_sink_id(); 2039 return id.frame_sink_id();
2040 } 2040 }
2041 2041
2042 void RenderWidgetHostViewAura::ProcessMouseEvent( 2042 void RenderWidgetHostViewAura::ProcessMouseEvent(
2043 const blink::WebMouseEvent& event, 2043 const blink::WebMouseEvent& event,
2044 const ui::LatencyInfo& latency) { 2044 const ui::LatencyInfo& latency) {
2045 host_->ForwardMouseEventWithLatencyInfo(event, latency); 2045 host_->ForwardMouseEventWithLatencyInfo(event, latency);
2046 } 2046 }
2047 2047
(...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after
3080 ->GetTextSelection(focused_view) 3080 ->GetTextSelection(focused_view)
3081 ->GetSelectedText(&selected_text)) { 3081 ->GetSelectedText(&selected_text)) {
3082 // Set the CLIPBOARD_TYPE_SELECTION to the ui::Clipboard. 3082 // Set the CLIPBOARD_TYPE_SELECTION to the ui::Clipboard.
3083 ui::ScopedClipboardWriter clipboard_writer(ui::CLIPBOARD_TYPE_SELECTION); 3083 ui::ScopedClipboardWriter clipboard_writer(ui::CLIPBOARD_TYPE_SELECTION);
3084 clipboard_writer.WriteText(selected_text); 3084 clipboard_writer.WriteText(selected_text);
3085 } 3085 }
3086 #endif // defined(USE_X11) && !defined(OS_CHROMEOS) 3086 #endif // defined(USE_X11) && !defined(OS_CHROMEOS)
3087 } 3087 }
3088 3088
3089 } // namespace content 3089 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698