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