Chromium Code Reviews| 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/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 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <tuple> | 10 #include <tuple> |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 88 #include "ui/gfx/color_space.h" | 88 #include "ui/gfx/color_space.h" |
| 89 #include "ui/gfx/geometry/size_conversions.h" | 89 #include "ui/gfx/geometry/size_conversions.h" |
| 90 #include "ui/gfx/geometry/vector2d_conversions.h" | 90 #include "ui/gfx/geometry/vector2d_conversions.h" |
| 91 #include "ui/gfx/image/image.h" | 91 #include "ui/gfx/image/image.h" |
| 92 #include "ui/gfx/image/image_skia.h" | 92 #include "ui/gfx/image/image_skia.h" |
| 93 #include "ui/gfx/skbitmap_operations.h" | 93 #include "ui/gfx/skbitmap_operations.h" |
| 94 #include "ui/snapshot/snapshot.h" | 94 #include "ui/snapshot/snapshot.h" |
| 95 | 95 |
| 96 #if defined(OS_ANDROID) | 96 #if defined(OS_ANDROID) |
| 97 #include "ui/android/view_android.h" | 97 #include "ui/android/view_android.h" |
| 98 #else | |
| 99 #include "content/browser/compositor/image_transport_factory.h" | |
| 100 #include "ui/compositor/compositor.h" // nogncheck | |
|
xlai (Olivia)
2017/02/15 18:05:46
Need nogncheck to pass Android analyze. This is sa
boliu
2017/02/15 19:59:20
So he problem is gn check isn't aware of OS define
xlai (Olivia)
2017/02/15 22:38:36
Done.
| |
| 98 #endif | 101 #endif |
| 99 | 102 |
| 100 #if defined(OS_MACOSX) | 103 #if defined(OS_MACOSX) |
| 101 #include "device/power_save_blocker/power_save_blocker.h" | 104 #include "device/power_save_blocker/power_save_blocker.h" |
| 102 #include "ui/accelerated_widget_mac/window_resize_helper_mac.h" | 105 #include "ui/accelerated_widget_mac/window_resize_helper_mac.h" |
| 103 #endif | 106 #endif |
| 104 | 107 |
| 105 using base::Time; | 108 using base::Time; |
| 106 using base::TimeDelta; | 109 using base::TimeDelta; |
| 107 using base::TimeTicks; | 110 using base::TimeTicks; |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 418 } | 421 } |
| 419 | 422 |
| 420 int RenderWidgetHostImpl::GetRoutingID() const { | 423 int RenderWidgetHostImpl::GetRoutingID() const { |
| 421 return routing_id_; | 424 return routing_id_; |
| 422 } | 425 } |
| 423 | 426 |
| 424 RenderWidgetHostViewBase* RenderWidgetHostImpl::GetView() const { | 427 RenderWidgetHostViewBase* RenderWidgetHostImpl::GetView() const { |
| 425 return view_.get(); | 428 return view_.get(); |
| 426 } | 429 } |
| 427 | 430 |
| 431 cc::FrameSinkId RenderWidgetHostImpl::AllocateFrameSinkId( | |
| 432 bool is_guest_view_hack) { | |
| 433 // GuestViews have two RenderWidgetHostViews and so we need to make sure | |
| 434 // we don't have FrameSinkId collisions. | |
| 435 #if !defined(OS_ANDROID) | |
| 436 if (is_guest_view_hack) { | |
| 437 ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); | |
| 438 return factory->GetContextFactoryPrivate()->AllocateFrameSinkId(); | |
| 439 } | |
| 440 #endif | |
| 441 return cc::FrameSinkId( | |
|
boliu
2017/02/15 19:59:20
keep the comment that this scheme must be unique w
xlai (Olivia)
2017/02/15 22:38:36
Done.
| |
| 442 base::checked_cast<uint32_t>(this->GetProcess()->GetID()), | |
| 443 base::checked_cast<uint32_t>(this->GetRoutingID())); | |
| 444 } | |
| 445 | |
| 428 void RenderWidgetHostImpl::ResetSizeAndRepaintPendingFlags() { | 446 void RenderWidgetHostImpl::ResetSizeAndRepaintPendingFlags() { |
| 429 resize_ack_pending_ = false; | 447 resize_ack_pending_ = false; |
| 430 if (repaint_ack_pending_) { | 448 if (repaint_ack_pending_) { |
| 431 TRACE_EVENT_ASYNC_END0( | 449 TRACE_EVENT_ASYNC_END0( |
| 432 "renderer_host", "RenderWidgetHostImpl::repaint_ack_pending_", this); | 450 "renderer_host", "RenderWidgetHostImpl::repaint_ack_pending_", this); |
| 433 } | 451 } |
| 434 repaint_ack_pending_ = false; | 452 repaint_ack_pending_ = false; |
| 435 if (old_resize_params_) | 453 if (old_resize_params_) |
| 436 old_resize_params_->new_size = gfx::Size(); | 454 old_resize_params_->new_size = gfx::Size(); |
| 437 } | 455 } |
| (...skipping 2071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2509 // different from the receiver's. | 2527 // different from the receiver's. |
| 2510 file_system_file.url = | 2528 file_system_file.url = |
| 2511 GURL(storage::GetIsolatedFileSystemRootURIString( | 2529 GURL(storage::GetIsolatedFileSystemRootURIString( |
| 2512 file_system_url.origin(), filesystem_id, std::string()) | 2530 file_system_url.origin(), filesystem_id, std::string()) |
| 2513 .append(register_name)); | 2531 .append(register_name)); |
| 2514 file_system_file.filesystem_id = filesystem_id; | 2532 file_system_file.filesystem_id = filesystem_id; |
| 2515 } | 2533 } |
| 2516 } | 2534 } |
| 2517 | 2535 |
| 2518 } // namespace content | 2536 } // namespace content |
| OLD | NEW |