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

Side by Side Diff: content/renderer/render_view_impl_android.cc

Issue 791923003: replace COMPILE_ASSERT with static_assert in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixups Created 5 years, 11 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
« no previous file with comments | « content/renderer/pepper/pepper_video_capture_host.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "cc/trees/layer_tree_host.h" 9 #include "cc/trees/layer_tree_host.h"
10 #include "content/common/view_messages.h" 10 #include "content/common/view_messages.h"
11 #include "content/renderer/gpu/render_widget_compositor.h" 11 #include "content/renderer/gpu/render_widget_compositor.h"
12 #include "third_party/WebKit/public/web/WebView.h" 12 #include "third_party/WebKit/public/web/WebView.h"
13 13
14 namespace content { 14 namespace content {
15 15
16 // Check content::TopControlsState and cc::TopControlsState are kept in sync. 16 // Check content::TopControlsState and cc::TopControlsState are kept in sync.
17 COMPILE_ASSERT(int(TOP_CONTROLS_STATE_SHOWN) == int(cc::SHOWN), 17 static_assert(int(TOP_CONTROLS_STATE_SHOWN) == int(cc::SHOWN),
18 mismatching_enums); 18 "mismatching enums: SHOWN");
19 COMPILE_ASSERT(int(TOP_CONTROLS_STATE_HIDDEN) == int(cc::HIDDEN), 19 static_assert(int(TOP_CONTROLS_STATE_HIDDEN) == int(cc::HIDDEN),
20 mismatching_enums); 20 "mismatching enums: HIDDEN");
21 COMPILE_ASSERT(int(TOP_CONTROLS_STATE_BOTH) == int(cc::BOTH), 21 static_assert(int(TOP_CONTROLS_STATE_BOTH) == int(cc::BOTH),
22 mismatching_enums); 22 "mismatching enums: BOTH");
23 23
24 cc::TopControlsState ContentToCcTopControlsState( 24 cc::TopControlsState ContentToCcTopControlsState(
25 TopControlsState state) { 25 TopControlsState state) {
26 return static_cast<cc::TopControlsState>(state); 26 return static_cast<cc::TopControlsState>(state);
27 } 27 }
28 28
29 // TODO(mvanouwerkerk): Stop calling this code path and delete it. 29 // TODO(mvanouwerkerk): Stop calling this code path and delete it.
30 void RenderViewImpl::OnUpdateTopControlsState(bool enable_hiding, 30 void RenderViewImpl::OnUpdateTopControlsState(bool enable_hiding,
31 bool enable_showing, 31 bool enable_showing,
32 bool animate) { 32 bool animate) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 void RenderViewImpl::OnExtractSmartClipData(const gfx::Rect& rect) { 70 void RenderViewImpl::OnExtractSmartClipData(const gfx::Rect& rect) {
71 blink::WebString clip_text; 71 blink::WebString clip_text;
72 blink::WebString clip_html; 72 blink::WebString clip_html;
73 blink::WebRect clip_rect; 73 blink::WebRect clip_rect;
74 webview()->extractSmartClipData(rect, clip_text, clip_html, clip_rect); 74 webview()->extractSmartClipData(rect, clip_text, clip_html, clip_rect);
75 Send(new ViewHostMsg_SmartClipDataExtracted( 75 Send(new ViewHostMsg_SmartClipDataExtracted(
76 routing_id_, clip_text, clip_html, clip_rect)); 76 routing_id_, clip_text, clip_html, clip_rect));
77 } 77 }
78 78
79 } // namespace content 79 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_video_capture_host.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698