platform_view_mac.mm 760 字节
Newer Older
C
Chinmay Garde 已提交
1 2 3 4
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

5
#include "sky/shell/mac/platform_view_mac.h"
C
Chinmay Garde 已提交
6 7 8 9

namespace sky {
namespace shell {

10
PlatformView* PlatformView::Create(const Config& config) {
11
  return new PlatformViewMac(config);
12 13
}

14
PlatformViewMac::PlatformViewMac(const Config& config)
15 16 17
  : PlatformView(config) {
}

18
PlatformViewMac::~PlatformViewMac() {
19 20
}

21
void PlatformViewMac::SurfaceCreated(gfx::AcceleratedWidget widget) {
C
Chinmay Garde 已提交
22 23 24 25 26
  DCHECK(window_ == 0);
  window_ = widget;
  SurfaceWasCreated();
}

27
void PlatformViewMac::SurfaceDestroyed() {
C
Chinmay Garde 已提交
28 29 30 31 32 33 34
  DCHECK(window_);
  window_ = 0;
  SurfaceWasDestroyed();
}

}  // namespace shell
}  // namespace sky