OLD | NEW |
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(SHOWN) == int(cc::SHOWN), mismatching_enums); | 17 COMPILE_ASSERT(int(TOP_CONTROLS_STATE_SHOWN) == int(cc::SHOWN), |
18 COMPILE_ASSERT(int(HIDDEN) == int(cc::HIDDEN), mismatching_enums); | 18 mismatching_enums); |
19 COMPILE_ASSERT(int(BOTH) == int(cc::BOTH), mismatching_enums); | 19 COMPILE_ASSERT(int(TOP_CONTROLS_STATE_HIDDEN) == int(cc::HIDDEN), |
| 20 mismatching_enums); |
| 21 COMPILE_ASSERT(int(TOP_CONTROLS_STATE_BOTH) == int(cc::BOTH), |
| 22 mismatching_enums); |
20 | 23 |
21 cc::TopControlsState ContentToCcTopControlsState( | 24 cc::TopControlsState ContentToCcTopControlsState( |
22 TopControlsState state) { | 25 TopControlsState state) { |
23 return static_cast<cc::TopControlsState>(state); | 26 return static_cast<cc::TopControlsState>(state); |
24 } | 27 } |
25 | 28 |
26 // TODO(mvanouwerkerk): Stop calling this code path and delete it. | 29 // TODO(mvanouwerkerk): Stop calling this code path and delete it. |
27 void RenderViewImpl::OnUpdateTopControlsState(bool enable_hiding, | 30 void RenderViewImpl::OnUpdateTopControlsState(bool enable_hiding, |
28 bool enable_showing, | 31 bool enable_showing, |
29 bool animate) { | 32 bool animate) { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 void RenderViewImpl::OnExtractSmartClipData(const gfx::Rect& rect) { | 70 void RenderViewImpl::OnExtractSmartClipData(const gfx::Rect& rect) { |
68 blink::WebString clip_text; | 71 blink::WebString clip_text; |
69 blink::WebString clip_html; | 72 blink::WebString clip_html; |
70 blink::WebRect clip_rect; | 73 blink::WebRect clip_rect; |
71 webview()->extractSmartClipData(rect, clip_text, clip_html, clip_rect); | 74 webview()->extractSmartClipData(rect, clip_text, clip_html, clip_rect); |
72 Send(new ViewHostMsg_SmartClipDataExtracted( | 75 Send(new ViewHostMsg_SmartClipDataExtracted( |
73 routing_id_, clip_text, clip_html, clip_rect)); | 76 routing_id_, clip_text, clip_html, clip_rect)); |
74 } | 77 } |
75 | 78 |
76 } // namespace content | 79 } // namespace content |
OLD | NEW |