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 "content/browser/renderer_host/render_view_host.h" | 5 #include "content/browser/renderer_host/render_view_host.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1002 void RenderViewHost::OnMsgDidContentsPreferredSizeChange( | 1002 void RenderViewHost::OnMsgDidContentsPreferredSizeChange( |
1003 const gfx::Size& new_size) { | 1003 const gfx::Size& new_size) { |
1004 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); | 1004 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); |
1005 if (!view) | 1005 if (!view) |
1006 return; | 1006 return; |
1007 view->UpdatePreferredSize(new_size); | 1007 view->UpdatePreferredSize(new_size); |
1008 } | 1008 } |
1009 | 1009 |
1010 void RenderViewHost::OnMsgDidChangeScrollbarsForMainFrame( | 1010 void RenderViewHost::OnMsgDidChangeScrollbarsForMainFrame( |
1011 bool has_horizontal_scrollbar, bool has_vertical_scrollbar) { | 1011 bool has_horizontal_scrollbar, bool has_vertical_scrollbar) { |
1012 // TODO(thakis): Implement, http://crbug.com/90228 | 1012 if (view()) |
1013 view()->SetHasHorizontalScrollbar(has_horizontal_scrollbar); | |
1013 } | 1014 } |
1014 | 1015 |
1015 void RenderViewHost::OnMsgDidChangeScrollOffsetPinningForMainFrame( | 1016 void RenderViewHost::OnMsgDidChangeScrollOffsetPinningForMainFrame( |
1016 bool is_pinned_to_left, bool is_pinned_to_right) { | 1017 bool is_pinned_to_left, bool is_pinned_to_right) { |
1017 // TODO(thakis): Implement, http://crbug.com/90228 | 1018 if (view()) |
1019 view()->SetScrollOffsetPinning(is_pinned_to_left, is_pinned_to_right); | |
1018 } | 1020 } |
1019 | 1021 |
1020 void RenderViewHost::OnMsgDidChangeNumWheelEvents(int count) { | 1022 void RenderViewHost::OnMsgDidChangeNumWheelEvents(int count) { |
Mark Mentovai
2011/08/15 14:43:57
Will we be using this at all?
Nico
2011/08/15 16:39:46
Good question. WebKit2 piped it through along with
| |
1021 // TODO(thakis): Implement, http://crbug.com/90228 | |
1022 } | 1023 } |
1023 | 1024 |
1024 void RenderViewHost::OnMsgSelectionChanged(const std::string& text, | 1025 void RenderViewHost::OnMsgSelectionChanged(const std::string& text, |
1025 const ui::Range& range, | 1026 const ui::Range& range, |
1026 const gfx::Point& start, | 1027 const gfx::Point& start, |
1027 const gfx::Point& end) { | 1028 const gfx::Point& end) { |
1028 if (view()) | 1029 if (view()) |
1029 view()->SelectionChanged(text, range, start, end); | 1030 view()->SelectionChanged(text, range, start, end); |
1030 } | 1031 } |
1031 | 1032 |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1354 if (view) { | 1355 if (view) { |
1355 view->ShowPopupMenu(params.bounds, | 1356 view->ShowPopupMenu(params.bounds, |
1356 params.item_height, | 1357 params.item_height, |
1357 params.item_font_size, | 1358 params.item_font_size, |
1358 params.selected_item, | 1359 params.selected_item, |
1359 params.popup_items, | 1360 params.popup_items, |
1360 params.right_aligned); | 1361 params.right_aligned); |
1361 } | 1362 } |
1362 } | 1363 } |
1363 #endif | 1364 #endif |
OLD | NEW |