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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 351683002: Adds link disambiguation popup support to Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: first patch ready for review Created 6 years, 5 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
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/browser/renderer_host/render_widget_host_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1619 matching lines...) Expand 10 before | Expand all | Expand 10 after
1630 GetProcess()->ReceivedBadMessage(); 1630 GetProcess()->ReceivedBadMessage();
1631 return; 1631 return;
1632 } 1632 }
1633 1633
1634 DCHECK(bitmap->pixels()); 1634 DCHECK(bitmap->pixels());
1635 1635
1636 SkImageInfo info = SkImageInfo::MakeN32Premul(size.width(), size.height()); 1636 SkImageInfo info = SkImageInfo::MakeN32Premul(size.width(), size.height());
1637 SkBitmap zoomed_bitmap; 1637 SkBitmap zoomed_bitmap;
1638 zoomed_bitmap.installPixels(info, bitmap->pixels(), info.minRowBytes()); 1638 zoomed_bitmap.installPixels(info, bitmap->pixels(), info.minRowBytes());
1639 1639
1640 #if defined(OS_ANDROID) 1640 #if defined(OS_ANDROID) || defined(OS_WIN)
1641 if (view_) 1641 if (view_)
1642 view_->ShowDisambiguationPopup(rect, zoomed_bitmap); 1642 view_->ShowDisambiguationPopup(rect, zoomed_bitmap);
1643 #else 1643 #else
cpu_(ooo_6.6-7.5) 2014/07/20 01:50:44 add comment about the rect coordinates, for future
luken 2014/07/21 18:01:29 Done.
1644 NOTIMPLEMENTED(); 1644 NOTIMPLEMENTED();
1645 #endif 1645 #endif
1646 1646
1647 zoomed_bitmap.setPixels(0); 1647 zoomed_bitmap.setPixels(0);
cpu_(ooo_6.6-7.5) 2014/07/20 01:50:44 interesting it goes to 0, what is the ownership mo
luken 2014/07/21 18:01:29 It's not explained anywhere else. I think they hav
1648 Send(new ViewMsg_ReleaseDisambiguationPopupBitmap(GetRoutingID(), id)); 1648 Send(new ViewMsg_ReleaseDisambiguationPopupBitmap(GetRoutingID(), id));
1649 } 1649 }
1650 1650
1651 #if defined(OS_WIN) 1651 #if defined(OS_WIN)
1652 void RenderWidgetHostImpl::OnWindowlessPluginDummyWindowCreated( 1652 void RenderWidgetHostImpl::OnWindowlessPluginDummyWindowCreated(
1653 gfx::NativeViewId dummy_activation_window) { 1653 gfx::NativeViewId dummy_activation_window) {
1654 HWND hwnd = reinterpret_cast<HWND>(dummy_activation_window); 1654 HWND hwnd = reinterpret_cast<HWND>(dummy_activation_window);
1655 1655
1656 // This may happen as a result of a race condition when the plugin is going 1656 // This may happen as a result of a race condition when the plugin is going
1657 // away. 1657 // away.
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
2252 } 2252 }
2253 #endif 2253 #endif
2254 2254
2255 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { 2255 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() {
2256 if (view_) 2256 if (view_)
2257 return view_->PreferredReadbackFormat(); 2257 return view_->PreferredReadbackFormat();
2258 return kN32_SkColorType; 2258 return kN32_SkColorType;
2259 } 2259 }
2260 2260
2261 } // namespace content 2261 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698