Built UserAgent according to OS And Product.
[platform/framework/web/crosswalk-tizen.git] / atom / browser / native_browser_view.h
1 // Copyright (c) 2017 GitHub, Inc.
2 // Use of this source code is governed by the MIT license that can be
3 // found in the LICENSE file.
4
5 #ifndef ATOM_BROWSER_NATIVE_BROWSER_VIEW_H_
6 #define ATOM_BROWSER_NATIVE_BROWSER_VIEW_H_
7
8 #include "base/macros.h"
9 #include "third_party/skia/include/core/SkColor.h"
10
11 namespace brightray {
12 class InspectableWebContentsView;
13 }
14
15 namespace gfx {
16 class Rect;
17 }
18
19 namespace atom {
20
21 namespace api {
22 class WebContents;
23 }
24
25 enum AutoResizeFlags {
26   kAutoResizeWidth = 0x1,
27   kAutoResizeHeight = 0x2,
28 };
29
30 class NativeBrowserView {
31  public:
32   virtual ~NativeBrowserView();
33
34   static NativeBrowserView* Create(
35       brightray::InspectableWebContentsView* web_contents_view);
36
37   brightray::InspectableWebContentsView* GetInspectableWebContentsView() {
38     return web_contents_view_;
39   }
40
41   virtual void SetAutoResizeFlags(uint8_t flags) = 0;
42   virtual void SetBounds(const gfx::Rect& bounds) = 0;
43   virtual void SetBackgroundColor(SkColor color) = 0;
44
45  protected:
46   explicit NativeBrowserView(
47       brightray::InspectableWebContentsView* web_contents_view);
48
49   brightray::InspectableWebContentsView* web_contents_view_;
50
51  private:
52   DISALLOW_COPY_AND_ASSIGN(NativeBrowserView);
53 };
54
55 }  // namespace atom
56
57 #endif  // ATOM_BROWSER_NATIVE_BROWSER_VIEW_H_