| 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 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 // Maximize or show surface as a maximized window. | 40 // Maximize or show surface as a maximized window. |
| 41 void SetMaximized(); | 41 void SetMaximized(); |
| 42 | 42 |
| 43 // Fullscreen or show surface as a fullscreen window. | 43 // Fullscreen or show surface as a fullscreen window. |
| 44 void SetFullscreen(); | 44 void SetFullscreen(); |
| 45 | 45 |
| 46 // Set title for surface. | 46 // Set title for surface. |
| 47 void SetTitle(const base::string16& title); | 47 void SetTitle(const base::string16& title); |
| 48 | 48 |
| 49 // Sets the application ID for the window. The application ID identifies the |
| 50 // general class of applications to which the window belongs. |
| 51 static void SetApplicationId(aura::Window* window, |
| 52 std::string* application_id); |
| 53 static const std::string GetApplicationId(aura::Window* window); |
| 54 |
| 55 // Set application id for surface. |
| 56 void SetApplicationId(const std::string& application_id); |
| 57 |
| 49 // Start an interactive move of surface. | 58 // Start an interactive move of surface. |
| 50 void Move(); | 59 void Move(); |
| 51 | 60 |
| 52 // Returns a trace value representing the state of the surface. | 61 // Returns a trace value representing the state of the surface. |
| 53 scoped_refptr<base::trace_event::TracedValue> AsTracedValue() const; | 62 scoped_refptr<base::trace_event::TracedValue> AsTracedValue() const; |
| 54 | 63 |
| 55 // Overridden from SurfaceDelegate: | 64 // Overridden from SurfaceDelegate: |
| 56 void OnSurfaceCommit() override; | 65 void OnSurfaceCommit() override; |
| 57 bool IsSurfaceSynchronized() const override; | 66 bool IsSurfaceSynchronized() const override; |
| 58 | 67 |
| 59 // Overridden from SurfaceObserver: | 68 // Overridden from SurfaceObserver: |
| 60 void OnSurfaceDestroying(Surface* surface) override; | 69 void OnSurfaceDestroying(Surface* surface) override; |
| 61 | 70 |
| 62 // Overridden from views::WidgetDelegate: | 71 // Overridden from views::WidgetDelegate: |
| 63 base::string16 GetWindowTitle() const override; | 72 base::string16 GetWindowTitle() const override; |
| 64 views::Widget* GetWidget() override; | 73 views::Widget* GetWidget() override; |
| 65 const views::Widget* GetWidget() const override; | 74 const views::Widget* GetWidget() const override; |
| 66 views::View* GetContentsView() override; | 75 views::View* GetContentsView() override; |
| 67 views::NonClientFrameView* CreateNonClientFrameView( | 76 views::NonClientFrameView* CreateNonClientFrameView( |
| 68 views::Widget* widget) override; | 77 views::Widget* widget) override; |
| 69 | 78 |
| 70 // Overridden from views::View: | 79 // Overridden from views::View: |
| 71 gfx::Size GetPreferredSize() const override; | 80 gfx::Size GetPreferredSize() const override; |
| 72 | 81 |
| 73 private: | 82 private: |
| 74 scoped_ptr<views::Widget> widget_; | 83 scoped_ptr<views::Widget> widget_; |
| 75 Surface* surface_; | 84 Surface* surface_; |
| 76 base::string16 title_; | 85 base::string16 title_; |
| 86 std::string application_id_; |
| 77 | 87 |
| 78 DISALLOW_COPY_AND_ASSIGN(ShellSurface); | 88 DISALLOW_COPY_AND_ASSIGN(ShellSurface); |
| 79 }; | 89 }; |
| 80 | 90 |
| 81 } // namespace exo | 91 } // namespace exo |
| 82 | 92 |
| 83 #endif // COMPONENTS_EXO_SHELL_SURFACE_H_ | 93 #endif // COMPONENTS_EXO_SHELL_SURFACE_H_ |
| OLD | NEW |