| 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 <cstdint> | 8 #include <cstdint> |
| 9 #include <deque> | 9 #include <deque> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 void SetSystemModal(bool system_modal); | 148 void SetSystemModal(bool system_modal); |
| 149 | 149 |
| 150 // Sets the application ID for the window. The application ID identifies the | 150 // Sets the application ID for the window. The application ID identifies the |
| 151 // general class of applications to which the window belongs. | 151 // general class of applications to which the window belongs. |
| 152 static void SetApplicationId(aura::Window* window, const std::string& id); | 152 static void SetApplicationId(aura::Window* window, const std::string& id); |
| 153 static const std::string GetApplicationId(aura::Window* window); | 153 static const std::string GetApplicationId(aura::Window* window); |
| 154 | 154 |
| 155 // Set the application ID for the surface. | 155 // Set the application ID for the surface. |
| 156 void SetApplicationId(const std::string& application_id); | 156 void SetApplicationId(const std::string& application_id); |
| 157 | 157 |
| 158 // Set icon for the window. |
| 159 static void SetAppIcon(aura::Window* window, const gfx::ImageSkia& icon); |
| 160 |
| 158 // Start an interactive move of surface. | 161 // Start an interactive move of surface. |
| 159 void Move(); | 162 void Move(); |
| 160 | 163 |
| 161 // Start an interactive resize of surface. |component| is one of the windows | 164 // Start an interactive resize of surface. |component| is one of the windows |
| 162 // HT constants (see ui/base/hit_test.h) and describes in what direction the | 165 // HT constants (see ui/base/hit_test.h) and describes in what direction the |
| 163 // surface should be resized. | 166 // surface should be resized. |
| 164 void Resize(int component); | 167 void Resize(int component); |
| 165 | 168 |
| 166 // Signal a request to close the window. It is up to the implementation to | 169 // Signal a request to close the window. It is up to the implementation to |
| 167 // actually decide to do so though. | 170 // actually decide to do so though. |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 bool IsSurfaceSynchronized() const override; | 224 bool IsSurfaceSynchronized() const override; |
| 222 | 225 |
| 223 // Overridden from SurfaceObserver: | 226 // Overridden from SurfaceObserver: |
| 224 void OnSurfaceDestroying(Surface* surface) override; | 227 void OnSurfaceDestroying(Surface* surface) override; |
| 225 | 228 |
| 226 // Overridden from views::WidgetDelegate: | 229 // Overridden from views::WidgetDelegate: |
| 227 bool CanResize() const override; | 230 bool CanResize() const override; |
| 228 bool CanMaximize() const override; | 231 bool CanMaximize() const override; |
| 229 bool CanMinimize() const override; | 232 bool CanMinimize() const override; |
| 230 base::string16 GetWindowTitle() const override; | 233 base::string16 GetWindowTitle() const override; |
| 234 gfx::ImageSkia GetWindowIcon() override; |
| 231 void SaveWindowPlacement(const gfx::Rect& bounds, | 235 void SaveWindowPlacement(const gfx::Rect& bounds, |
| 232 ui::WindowShowState show_state) override; | 236 ui::WindowShowState show_state) override; |
| 233 bool GetSavedWindowPlacement(const views::Widget* widget, | 237 bool GetSavedWindowPlacement(const views::Widget* widget, |
| 234 gfx::Rect* bounds, | 238 gfx::Rect* bounds, |
| 235 ui::WindowShowState* show_state) const override; | 239 ui::WindowShowState* show_state) const override; |
| 236 void WindowClosing() override; | 240 void WindowClosing() override; |
| 237 views::Widget* GetWidget() override; | 241 views::Widget* GetWidget() override; |
| 238 const views::Widget* GetWidget() const override; | 242 const views::Widget* GetWidget() const override; |
| 239 views::View* GetContentsView() override; | 243 views::View* GetContentsView() override; |
| 240 views::NonClientFrameView* CreateNonClientFrameView( | 244 views::NonClientFrameView* CreateNonClientFrameView( |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 gfx::Rect shadow_content_bounds_; | 375 gfx::Rect shadow_content_bounds_; |
| 372 float shadow_background_opacity_ = 1.0; | 376 float shadow_background_opacity_ = 1.0; |
| 373 std::deque<Config> pending_configs_; | 377 std::deque<Config> pending_configs_; |
| 374 std::unique_ptr<ash::WindowResizer> resizer_; | 378 std::unique_ptr<ash::WindowResizer> resizer_; |
| 375 std::unique_ptr<ScopedAnimationsDisabled> scoped_animations_disabled_; | 379 std::unique_ptr<ScopedAnimationsDisabled> scoped_animations_disabled_; |
| 376 int top_inset_height_ = 0; | 380 int top_inset_height_ = 0; |
| 377 int pending_top_inset_height_ = 0; | 381 int pending_top_inset_height_ = 0; |
| 378 bool shadow_underlay_in_surface_ = true; | 382 bool shadow_underlay_in_surface_ = true; |
| 379 bool pending_shadow_underlay_in_surface_ = true; | 383 bool pending_shadow_underlay_in_surface_ = true; |
| 380 bool system_modal_ = false; | 384 bool system_modal_ = false; |
| 385 gfx::ImageSkia icon_; |
| 381 | 386 |
| 382 DISALLOW_COPY_AND_ASSIGN(ShellSurface); | 387 DISALLOW_COPY_AND_ASSIGN(ShellSurface); |
| 383 }; | 388 }; |
| 384 | 389 |
| 385 } // namespace exo | 390 } // namespace exo |
| 386 | 391 |
| 387 #endif // COMPONENTS_EXO_SHELL_SURFACE_H_ | 392 #endif // COMPONENTS_EXO_SHELL_SURFACE_H_ |
| OLD | NEW |