• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2011 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_TAB_CONTENTS_NATIVE_TAB_CONTENTS_VIEW_DELEGATE_H_
6 #define CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_NATIVE_TAB_CONTENTS_VIEW_DELEGATE_H_
7 #pragma once
8 
9 class TabContents;
10 namespace gfx{
11 class Size;
12 }
13 
14 namespace internal {
15 
16 class NativeTabContentsViewDelegate {
17  public:
~NativeTabContentsViewDelegate()18   virtual ~NativeTabContentsViewDelegate() {}
19 
20   virtual TabContents* GetTabContents() = 0;
21 
22   // TODO(beng):
23   // This can die with OnNativeTabContentsViewMouseDown/Move().
24   virtual bool IsShowingSadTab() const = 0;
25 
26   // TODO(beng):
27   // These three can be replaced by Widget::OnSizeChanged and some new
28   // notifications for show/hide.
29   virtual void OnNativeTabContentsViewShown() = 0;
30   virtual void OnNativeTabContentsViewHidden() = 0;
31   virtual void OnNativeTabContentsViewSized(const gfx::Size& size) = 0;
32 
33   virtual void OnNativeTabContentsViewWheelZoom(int distance) = 0;
34 
35   // TODO(beng):
36   // These two can be replaced by an override of Widget::OnMouseEvent.
37   virtual void OnNativeTabContentsViewMouseDown() = 0;
38   virtual void OnNativeTabContentsViewMouseMove() = 0;
39 
40   virtual void OnNativeTabContentsViewDraggingEnded() = 0;
41 };
42 
43 }  // namespace internal
44 
45 #endif  // CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_NATIVE_TAB_CONTENTS_VIEW_DELEGATE_H_
46