contents_web_view.h revision 23730a6e56a168d1879203e4b3819bb36e3d8f1f
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_CONTENTS_WEB_VIEW_H_
6#define CHROME_BROWSER_UI_VIEWS_FRAME_CONTENTS_WEB_VIEW_H_
7
8#include "base/basictypes.h"
9#include "base/compiler_specific.h"
10#include "ui/views/controls/webview/webview.h"
11
12class StatusBubbleViews;
13
14// ContentsWebView is used to present WebContents of active tab.
15class ContentsWebView : public views::WebView {
16 public:
17  explicit ContentsWebView(content::BrowserContext* browser_context);
18  virtual ~ContentsWebView();
19
20  // Sets the status bubble, which should be repositioned every time
21  // this view changes visible bounds.
22  void SetStatusBubble(StatusBubbleViews* status_bubble);
23
24  // views::View overrides:
25  virtual bool NeedsNotificationWhenVisibleBoundsChange() const OVERRIDE;
26  virtual void OnVisibleBoundsChanged() OVERRIDE;
27  virtual void ViewHierarchyChanged(const ViewHierarchyChangedDetails& details)
28      OVERRIDE;
29  virtual void OnThemeChanged() OVERRIDE;
30
31 private:
32  StatusBubbleViews* status_bubble_;
33
34  DISALLOW_COPY_AND_ASSIGN(ContentsWebView);
35};
36
37#endif  // CHROME_BROWSER_UI_VIEWS_FRAME_CONTENTS_WEB_VIEW_H_
38