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 <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1237 IPC_MESSAGE_HANDLER(ViewMsg_EnumerateDirectoryResponse, | 1237 IPC_MESSAGE_HANDLER(ViewMsg_EnumerateDirectoryResponse, |
1238 OnEnumerateDirectoryResponse) | 1238 OnEnumerateDirectoryResponse) |
1239 IPC_MESSAGE_HANDLER(ViewMsg_RunFileChooserResponse, OnFileChooserResponse) | 1239 IPC_MESSAGE_HANDLER(ViewMsg_RunFileChooserResponse, OnFileChooserResponse) |
1240 IPC_MESSAGE_HANDLER(ViewMsg_ShouldClose, OnShouldClose) | 1240 IPC_MESSAGE_HANDLER(ViewMsg_ShouldClose, OnShouldClose) |
1241 IPC_MESSAGE_HANDLER(ViewMsg_SuppressDialogsUntilSwapOut, | 1241 IPC_MESSAGE_HANDLER(ViewMsg_SuppressDialogsUntilSwapOut, |
1242 OnSuppressDialogsUntilSwapOut) | 1242 OnSuppressDialogsUntilSwapOut) |
1243 IPC_MESSAGE_HANDLER(ViewMsg_SwapOut, OnSwapOut) | 1243 IPC_MESSAGE_HANDLER(ViewMsg_SwapOut, OnSwapOut) |
1244 IPC_MESSAGE_HANDLER(ViewMsg_ClosePage, OnClosePage) | 1244 IPC_MESSAGE_HANDLER(ViewMsg_ClosePage, OnClosePage) |
1245 IPC_MESSAGE_HANDLER(ViewMsg_ThemeChanged, OnThemeChanged) | 1245 IPC_MESSAGE_HANDLER(ViewMsg_ThemeChanged, OnThemeChanged) |
1246 IPC_MESSAGE_HANDLER(ViewMsg_MoveOrResizeStarted, OnMoveOrResizeStarted) | 1246 IPC_MESSAGE_HANDLER(ViewMsg_MoveOrResizeStarted, OnMoveOrResizeStarted) |
1247 IPC_MESSAGE_HANDLER(ViewMsg_ClearFocusedNode, OnClearFocusedNode) | 1247 IPC_MESSAGE_HANDLER(ViewMsg_ClearFocusedElement, OnClearFocusedElement) |
1248 IPC_MESSAGE_HANDLER(ViewMsg_SetBackground, OnSetBackground) | 1248 IPC_MESSAGE_HANDLER(ViewMsg_SetBackground, OnSetBackground) |
1249 IPC_MESSAGE_HANDLER(ViewMsg_EnablePreferredSizeChangedMode, | 1249 IPC_MESSAGE_HANDLER(ViewMsg_EnablePreferredSizeChangedMode, |
1250 OnEnablePreferredSizeChangedMode) | 1250 OnEnablePreferredSizeChangedMode) |
1251 IPC_MESSAGE_HANDLER(ViewMsg_EnableAutoResize, OnEnableAutoResize) | 1251 IPC_MESSAGE_HANDLER(ViewMsg_EnableAutoResize, OnEnableAutoResize) |
1252 IPC_MESSAGE_HANDLER(ViewMsg_DisableAutoResize, OnDisableAutoResize) | 1252 IPC_MESSAGE_HANDLER(ViewMsg_DisableAutoResize, OnDisableAutoResize) |
1253 IPC_MESSAGE_HANDLER(ViewMsg_DisableScrollbarsForSmallWindows, | 1253 IPC_MESSAGE_HANDLER(ViewMsg_DisableScrollbarsForSmallWindows, |
1254 OnDisableScrollbarsForSmallWindows) | 1254 OnDisableScrollbarsForSmallWindows) |
1255 IPC_MESSAGE_HANDLER(ViewMsg_SetRendererPrefs, OnSetRendererPrefs) | 1255 IPC_MESSAGE_HANDLER(ViewMsg_SetRendererPrefs, OnSetRendererPrefs) |
1256 IPC_MESSAGE_HANDLER(ViewMsg_MediaPlayerActionAt, OnMediaPlayerActionAt) | 1256 IPC_MESSAGE_HANDLER(ViewMsg_MediaPlayerActionAt, OnMediaPlayerActionAt) |
1257 IPC_MESSAGE_HANDLER(ViewMsg_OrientationChangeEvent, | 1257 IPC_MESSAGE_HANDLER(ViewMsg_OrientationChangeEvent, |
(...skipping 3534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4792 } | 4792 } |
4793 #endif | 4793 #endif |
4794 return NULL; | 4794 return NULL; |
4795 } | 4795 } |
4796 | 4796 |
4797 gfx::Vector2d RenderViewImpl::GetScrollOffset() { | 4797 gfx::Vector2d RenderViewImpl::GetScrollOffset() { |
4798 WebSize scroll_offset = webview()->mainFrame()->scrollOffset(); | 4798 WebSize scroll_offset = webview()->mainFrame()->scrollOffset(); |
4799 return gfx::Vector2d(scroll_offset.width, scroll_offset.height); | 4799 return gfx::Vector2d(scroll_offset.width, scroll_offset.height); |
4800 } | 4800 } |
4801 | 4801 |
4802 void RenderViewImpl::OnClearFocusedNode() { | 4802 void RenderViewImpl::OnClearFocusedElement() { |
4803 if (webview()) | 4803 if (webview()) |
4804 webview()->clearFocusedNode(); | 4804 webview()->clearFocusedElement(); |
4805 } | 4805 } |
4806 | 4806 |
4807 void RenderViewImpl::OnSetBackground(const SkBitmap& background) { | 4807 void RenderViewImpl::OnSetBackground(const SkBitmap& background) { |
4808 if (webview()) | 4808 if (webview()) |
4809 webview()->setIsTransparent(!background.empty()); | 4809 webview()->setIsTransparent(!background.empty()); |
4810 if (compositor_) | 4810 if (compositor_) |
4811 compositor_->setHasTransparentBackground(!background.empty()); | 4811 compositor_->setHasTransparentBackground(!background.empty()); |
4812 | 4812 |
4813 SetBackground(background); | 4813 SetBackground(background); |
4814 } | 4814 } |
(...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5751 for (size_t i = 0; i < icon_urls.size(); i++) { | 5751 for (size_t i = 0; i < icon_urls.size(); i++) { |
5752 WebURL url = icon_urls[i].iconURL(); | 5752 WebURL url = icon_urls[i].iconURL(); |
5753 if (!url.isEmpty()) | 5753 if (!url.isEmpty()) |
5754 urls.push_back(FaviconURL(url, | 5754 urls.push_back(FaviconURL(url, |
5755 ToFaviconType(icon_urls[i].iconType()))); | 5755 ToFaviconType(icon_urls[i].iconType()))); |
5756 } | 5756 } |
5757 SendUpdateFaviconURL(urls); | 5757 SendUpdateFaviconURL(urls); |
5758 } | 5758 } |
5759 | 5759 |
5760 } // namespace content | 5760 } // namespace content |
OLD | NEW |