| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/browser_compositor_view_mac.h" | 5 #include "content/browser/renderer_host/browser_compositor_view_mac.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 } | 384 } |
| 385 | 385 |
| 386 //////////////////////////////////////////////////////////////////////////////// | 386 //////////////////////////////////////////////////////////////////////////////// |
| 387 // DelegatedFrameHost, public: | 387 // DelegatedFrameHost, public: |
| 388 | 388 |
| 389 ui::Layer* BrowserCompositorMac::DelegatedFrameHostGetLayer() const { | 389 ui::Layer* BrowserCompositorMac::DelegatedFrameHostGetLayer() const { |
| 390 return root_layer_.get(); | 390 return root_layer_.get(); |
| 391 } | 391 } |
| 392 | 392 |
| 393 bool BrowserCompositorMac::DelegatedFrameHostIsVisible() const { | 393 bool BrowserCompositorMac::DelegatedFrameHostIsVisible() const { |
| 394 // TODO(ccameron): This should return the same value as | 394 return state_ == HasAttachedCompositor; |
| 395 // |render_widget_host_is_hidden_|, rather than going back to the | |
| 396 // RenderWidgetHostImpl. | |
| 397 return client_->BrowserCompositorMacIsVisible(); | |
| 398 } | 395 } |
| 399 | 396 |
| 400 SkColor BrowserCompositorMac::DelegatedFrameHostGetGutterColor( | 397 SkColor BrowserCompositorMac::DelegatedFrameHostGetGutterColor( |
| 401 SkColor color) const { | 398 SkColor color) const { |
| 402 return client_->BrowserCompositorMacGetGutterColor(color); | 399 return client_->BrowserCompositorMacGetGutterColor(color); |
| 403 } | 400 } |
| 404 | 401 |
| 405 gfx::Size BrowserCompositorMac::DelegatedFrameHostDesiredSizeInDIP() const { | 402 gfx::Size BrowserCompositorMac::DelegatedFrameHostDesiredSizeInDIP() const { |
| 406 NSRect bounds = [client_->BrowserCompositorMacGetNSView() bounds]; | 403 NSRect bounds = [client_->BrowserCompositorMacGetNSView() bounds]; |
| 407 return gfx::Size(bounds.size.width, bounds.size.height); | 404 return gfx::Size(bounds.size.width, bounds.size.height); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 | 462 |
| 466 const cc::BeginFrameArgs& BrowserCompositorMac::LastUsedBeginFrameArgs() const { | 463 const cc::BeginFrameArgs& BrowserCompositorMac::LastUsedBeginFrameArgs() const { |
| 467 return last_begin_frame_args_; | 464 return last_begin_frame_args_; |
| 468 } | 465 } |
| 469 | 466 |
| 470 void BrowserCompositorMac::OnBeginFrameSourcePausedChanged(bool paused) { | 467 void BrowserCompositorMac::OnBeginFrameSourcePausedChanged(bool paused) { |
| 471 // Only used on Android WebView. | 468 // Only used on Android WebView. |
| 472 } | 469 } |
| 473 | 470 |
| 474 } // namespace content | 471 } // namespace content |
| OLD | NEW |