OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_EXO_SHELL_SURFACE_H_ | 5 #ifndef COMPONENTS_EXO_SHELL_SURFACE_H_ |
6 #define COMPONENTS_EXO_SHELL_SURFACE_H_ | 6 #define COMPONENTS_EXO_SHELL_SURFACE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 static void SetApplicationId(aura::Window* window, | 51 static void SetApplicationId(aura::Window* window, |
52 std::string* application_id); | 52 std::string* application_id); |
53 static const std::string GetApplicationId(aura::Window* window); | 53 static const std::string GetApplicationId(aura::Window* window); |
54 | 54 |
55 // Set application id for surface. | 55 // Set application id for surface. |
56 void SetApplicationId(const std::string& application_id); | 56 void SetApplicationId(const std::string& application_id); |
57 | 57 |
58 // Start an interactive move of surface. | 58 // Start an interactive move of surface. |
59 void Move(); | 59 void Move(); |
60 | 60 |
| 61 // Set geometry for surface. The geometry represents the "visible bounds" |
| 62 // for the surface from the user's perspective. |
| 63 void SetGeometry(const gfx::Rect& geometry); |
| 64 |
61 // Returns a trace value representing the state of the surface. | 65 // Returns a trace value representing the state of the surface. |
62 scoped_refptr<base::trace_event::TracedValue> AsTracedValue() const; | 66 scoped_refptr<base::trace_event::TracedValue> AsTracedValue() const; |
63 | 67 |
64 // Overridden from SurfaceDelegate: | 68 // Overridden from SurfaceDelegate: |
65 void OnSurfaceCommit() override; | 69 void OnSurfaceCommit() override; |
66 bool IsSurfaceSynchronized() const override; | 70 bool IsSurfaceSynchronized() const override; |
67 | 71 |
68 // Overridden from SurfaceObserver: | 72 // Overridden from SurfaceObserver: |
69 void OnSurfaceDestroying(Surface* surface) override; | 73 void OnSurfaceDestroying(Surface* surface) override; |
70 | 74 |
71 // Overridden from views::WidgetDelegate: | 75 // Overridden from views::WidgetDelegate: |
72 base::string16 GetWindowTitle() const override; | 76 base::string16 GetWindowTitle() const override; |
73 views::Widget* GetWidget() override; | 77 views::Widget* GetWidget() override; |
74 const views::Widget* GetWidget() const override; | 78 const views::Widget* GetWidget() const override; |
75 views::View* GetContentsView() override; | 79 views::View* GetContentsView() override; |
76 views::NonClientFrameView* CreateNonClientFrameView( | 80 views::NonClientFrameView* CreateNonClientFrameView( |
77 views::Widget* widget) override; | 81 views::Widget* widget) override; |
78 | 82 |
79 // Overridden from views::View: | 83 // Overridden from views::View: |
80 gfx::Size GetPreferredSize() const override; | 84 gfx::Size GetPreferredSize() const override; |
81 | 85 |
82 private: | 86 private: |
83 scoped_ptr<views::Widget> widget_; | 87 scoped_ptr<views::Widget> widget_; |
84 Surface* surface_; | 88 Surface* surface_; |
85 base::string16 title_; | 89 base::string16 title_; |
86 std::string application_id_; | 90 std::string application_id_; |
| 91 gfx::Rect geometry_; |
87 | 92 |
88 DISALLOW_COPY_AND_ASSIGN(ShellSurface); | 93 DISALLOW_COPY_AND_ASSIGN(ShellSurface); |
89 }; | 94 }; |
90 | 95 |
91 } // namespace exo | 96 } // namespace exo |
92 | 97 |
93 #endif // COMPONENTS_EXO_SHELL_SURFACE_H_ | 98 #endif // COMPONENTS_EXO_SHELL_SURFACE_H_ |
OLD | NEW |