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

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

Issue 274453002: Remove RenderWidget::SetBackground, change IPC to pass a bool. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
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 <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 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 IPC_MESSAGE_HANDLER(ViewMsg_UpdateWebPreferences, OnUpdateWebPreferences) 1090 IPC_MESSAGE_HANDLER(ViewMsg_UpdateWebPreferences, OnUpdateWebPreferences)
1091 IPC_MESSAGE_HANDLER(ViewMsg_EnumerateDirectoryResponse, 1091 IPC_MESSAGE_HANDLER(ViewMsg_EnumerateDirectoryResponse,
1092 OnEnumerateDirectoryResponse) 1092 OnEnumerateDirectoryResponse)
1093 IPC_MESSAGE_HANDLER(ViewMsg_RunFileChooserResponse, OnFileChooserResponse) 1093 IPC_MESSAGE_HANDLER(ViewMsg_RunFileChooserResponse, OnFileChooserResponse)
1094 IPC_MESSAGE_HANDLER(ViewMsg_SuppressDialogsUntilSwapOut, 1094 IPC_MESSAGE_HANDLER(ViewMsg_SuppressDialogsUntilSwapOut,
1095 OnSuppressDialogsUntilSwapOut) 1095 OnSuppressDialogsUntilSwapOut)
1096 IPC_MESSAGE_HANDLER(ViewMsg_ClosePage, OnClosePage) 1096 IPC_MESSAGE_HANDLER(ViewMsg_ClosePage, OnClosePage)
1097 IPC_MESSAGE_HANDLER(ViewMsg_ThemeChanged, OnThemeChanged) 1097 IPC_MESSAGE_HANDLER(ViewMsg_ThemeChanged, OnThemeChanged)
1098 IPC_MESSAGE_HANDLER(ViewMsg_MoveOrResizeStarted, OnMoveOrResizeStarted) 1098 IPC_MESSAGE_HANDLER(ViewMsg_MoveOrResizeStarted, OnMoveOrResizeStarted)
1099 IPC_MESSAGE_HANDLER(ViewMsg_ClearFocusedElement, OnClearFocusedElement) 1099 IPC_MESSAGE_HANDLER(ViewMsg_ClearFocusedElement, OnClearFocusedElement)
1100 IPC_MESSAGE_HANDLER(ViewMsg_SetBackground, OnSetBackground) 1100 IPC_MESSAGE_HANDLER(ViewMsg_SetBackgroundOpaque, OnSetBackgroundOpaque)
1101 IPC_MESSAGE_HANDLER(ViewMsg_EnablePreferredSizeChangedMode, 1101 IPC_MESSAGE_HANDLER(ViewMsg_EnablePreferredSizeChangedMode,
1102 OnEnablePreferredSizeChangedMode) 1102 OnEnablePreferredSizeChangedMode)
1103 IPC_MESSAGE_HANDLER(ViewMsg_EnableAutoResize, OnEnableAutoResize) 1103 IPC_MESSAGE_HANDLER(ViewMsg_EnableAutoResize, OnEnableAutoResize)
1104 IPC_MESSAGE_HANDLER(ViewMsg_DisableAutoResize, OnDisableAutoResize) 1104 IPC_MESSAGE_HANDLER(ViewMsg_DisableAutoResize, OnDisableAutoResize)
1105 IPC_MESSAGE_HANDLER(ViewMsg_DisableScrollbarsForSmallWindows, 1105 IPC_MESSAGE_HANDLER(ViewMsg_DisableScrollbarsForSmallWindows,
1106 OnDisableScrollbarsForSmallWindows) 1106 OnDisableScrollbarsForSmallWindows)
1107 IPC_MESSAGE_HANDLER(ViewMsg_SetRendererPrefs, OnSetRendererPrefs) 1107 IPC_MESSAGE_HANDLER(ViewMsg_SetRendererPrefs, OnSetRendererPrefs)
1108 IPC_MESSAGE_HANDLER(ViewMsg_MediaPlayerActionAt, OnMediaPlayerActionAt) 1108 IPC_MESSAGE_HANDLER(ViewMsg_MediaPlayerActionAt, OnMediaPlayerActionAt)
1109 IPC_MESSAGE_HANDLER(ViewMsg_OrientationChangeEvent, 1109 IPC_MESSAGE_HANDLER(ViewMsg_OrientationChangeEvent,
1110 OnOrientationChangeEvent) 1110 OnOrientationChangeEvent)
(...skipping 2150 matching lines...) Expand 10 before | Expand all | Expand 10 after
3261 gfx::Vector2d RenderViewImpl::GetScrollOffset() { 3261 gfx::Vector2d RenderViewImpl::GetScrollOffset() {
3262 WebSize scroll_offset = webview()->mainFrame()->scrollOffset(); 3262 WebSize scroll_offset = webview()->mainFrame()->scrollOffset();
3263 return gfx::Vector2d(scroll_offset.width, scroll_offset.height); 3263 return gfx::Vector2d(scroll_offset.width, scroll_offset.height);
3264 } 3264 }
3265 3265
3266 void RenderViewImpl::OnClearFocusedElement() { 3266 void RenderViewImpl::OnClearFocusedElement() {
3267 if (webview()) 3267 if (webview())
3268 webview()->clearFocusedElement(); 3268 webview()->clearFocusedElement();
3269 } 3269 }
3270 3270
3271 void RenderViewImpl::OnSetBackground(const SkBitmap& background) { 3271 void RenderViewImpl::OnSetBackgroundOpaque(bool opaque) {
3272 if (webview()) 3272 if (webview())
3273 webview()->setIsTransparent(!background.empty()); 3273 webview()->setIsTransparent(!opaque);
3274 if (compositor_) 3274 if (compositor_)
3275 compositor_->setHasTransparentBackground(!background.empty()); 3275 compositor_->setHasTransparentBackground(!opaque);
3276
3277 SetBackground(background);
3278 } 3276 }
3279 3277
3280 void RenderViewImpl::OnSetAccessibilityMode(AccessibilityMode new_mode) { 3278 void RenderViewImpl::OnSetAccessibilityMode(AccessibilityMode new_mode) {
3281 if (accessibility_mode_ == new_mode) 3279 if (accessibility_mode_ == new_mode)
3282 return; 3280 return;
3283 accessibility_mode_ = new_mode; 3281 accessibility_mode_ = new_mode;
3284 if (renderer_accessibility_) { 3282 if (renderer_accessibility_) {
3285 delete renderer_accessibility_; 3283 delete renderer_accessibility_;
3286 renderer_accessibility_ = NULL; 3284 renderer_accessibility_ = NULL;
3287 } 3285 }
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
4139 std::vector<gfx::Size> sizes; 4137 std::vector<gfx::Size> sizes;
4140 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 4138 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
4141 if (!url.isEmpty()) 4139 if (!url.isEmpty())
4142 urls.push_back( 4140 urls.push_back(
4143 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 4141 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
4144 } 4142 }
4145 SendUpdateFaviconURL(urls); 4143 SendUpdateFaviconURL(urls);
4146 } 4144 }
4147 4145
4148 } // namespace content 4146 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698