Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / views / frame / web_contents_close_handler_delegate.h
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_WEB_CONTENTS_CLOSE_HANDLER_DELEGATE_H_
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_WEB_CONTENTS_CLOSE_HANDLER_DELEGATE_H_
7
8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h"
10
11 namespace ui {
12 class LayerTreeOwner;
13 }
14
15 // WebContentsCloseHandler delegate.
16 class WebContentsCloseHandlerDelegate {
17  public:
18   // Invoked to clone the layers of the WebContents. Should do nothing if there
19   // is already a clone (eg CloneWebContentsLayer() has been invoked without a
20   // DestroyClonedLayer()) or no WebContents. It is expected that when this is
21   // invoked the cloned layer tree is drawn on top of the existing WebContents.
22   virtual void CloneWebContentsLayer() = 0;
23
24   // Invoked to destroy the cloned layer tree. This may be invoked when there is
25   // no cloned layer tree.
26   virtual void DestroyClonedLayer() = 0;
27
28  protected:
29   virtual ~WebContentsCloseHandlerDelegate() {}
30 };
31
32 #endif  // CHROME_BROWSER_UI_VIEWS_FRAME_WEB_CONTENTS_CLOSE_HANDLER_DELEGATE_H_