| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_WINDOW_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_WINDOW_H_ |
| 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_WINDOW_H_ | 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_WINDOW_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "ash/public/cpp/shelf_types.h" | 11 #include "ash/public/cpp/shelf_types.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "chrome/browser/image_decoder.h" | 13 #include "chrome/browser/image_decoder.h" |
| 14 #include "chrome/browser/ui/ash/launcher/arc_app_shelf_id.h" | 14 #include "chrome/browser/ui/ash/launcher/arc_app_shelf_id.h" |
| 15 #include "ui/base/base_window.h" | 15 #include "ui/base/base_window.h" |
| 16 #include "ui/gfx/image/image_skia.h" | |
| 17 | 16 |
| 18 class ArcAppWindowLauncherController; | 17 class ArcAppWindowLauncherController; |
| 19 class ArcAppWindowLauncherItemController; | 18 class ArcAppWindowLauncherItemController; |
| 20 | 19 |
| 21 namespace views { | 20 namespace views { |
| 22 class Widget; | 21 class Widget; |
| 23 } | 22 } |
| 24 | 23 |
| 25 // A ui::BaseWindow for a chromeos launcher to control ARC applications. | 24 // A ui::BaseWindow for a chromeos launcher to control ARC applications. |
| 26 class ArcAppWindow : public ui::BaseWindow, public ImageDecoder::ImageRequest { | 25 class ArcAppWindow : public ui::BaseWindow, public ImageDecoder::ImageRequest { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 56 const arc::ArcAppShelfId& app_shelf_id() const { return app_shelf_id_; } | 55 const arc::ArcAppShelfId& app_shelf_id() const { return app_shelf_id_; } |
| 57 | 56 |
| 58 const ash::ShelfID& shelf_id() const { return shelf_id_; } | 57 const ash::ShelfID& shelf_id() const { return shelf_id_; } |
| 59 | 58 |
| 60 void set_shelf_id(const ash::ShelfID& shelf_id) { shelf_id_ = shelf_id; } | 59 void set_shelf_id(const ash::ShelfID& shelf_id) { shelf_id_ = shelf_id; } |
| 61 | 60 |
| 62 views::Widget* widget() const { return widget_; } | 61 views::Widget* widget() const { return widget_; } |
| 63 | 62 |
| 64 ArcAppWindowLauncherItemController* controller() { return controller_; } | 63 ArcAppWindowLauncherItemController* controller() { return controller_; } |
| 65 | 64 |
| 66 const gfx::ImageSkia& icon() const { return icon_; } | |
| 67 | |
| 68 // ui::BaseWindow: | 65 // ui::BaseWindow: |
| 69 bool IsActive() const override; | 66 bool IsActive() const override; |
| 70 bool IsMaximized() const override; | 67 bool IsMaximized() const override; |
| 71 bool IsMinimized() const override; | 68 bool IsMinimized() const override; |
| 72 bool IsFullscreen() const override; | 69 bool IsFullscreen() const override; |
| 73 gfx::NativeWindow GetNativeWindow() const override; | 70 gfx::NativeWindow GetNativeWindow() const override; |
| 74 gfx::Rect GetRestoredBounds() const override; | 71 gfx::Rect GetRestoredBounds() const override; |
| 75 ui::WindowShowState GetRestoredState() const override; | 72 ui::WindowShowState GetRestoredState() const override; |
| 76 gfx::Rect GetBounds() const override; | 73 gfx::Rect GetBounds() const override; |
| 77 void Show() override; | 74 void Show() override; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 96 void OnImageDecoded(const SkBitmap& decoded_image) override; | 93 void OnImageDecoded(const SkBitmap& decoded_image) override; |
| 97 | 94 |
| 98 // Keeps associated ARC task id. | 95 // Keeps associated ARC task id. |
| 99 const int task_id_; | 96 const int task_id_; |
| 100 // Keeps ARC shelf grouping id. | 97 // Keeps ARC shelf grouping id. |
| 101 const arc::ArcAppShelfId app_shelf_id_; | 98 const arc::ArcAppShelfId app_shelf_id_; |
| 102 // Keeps shelf id. | 99 // Keeps shelf id. |
| 103 ash::ShelfID shelf_id_; | 100 ash::ShelfID shelf_id_; |
| 104 // Keeps current full-screen mode. | 101 // Keeps current full-screen mode. |
| 105 FullScreenMode fullscreen_mode_ = FullScreenMode::NOT_DEFINED; | 102 FullScreenMode fullscreen_mode_ = FullScreenMode::NOT_DEFINED; |
| 106 // Contains custom icon if it was set. | |
| 107 gfx::ImageSkia icon_; | |
| 108 // Unowned pointers | 103 // Unowned pointers |
| 109 views::Widget* const widget_; | 104 views::Widget* const widget_; |
| 110 ArcAppWindowLauncherController* const owner_; | 105 ArcAppWindowLauncherController* const owner_; |
| 111 ArcAppWindowLauncherItemController* controller_ = nullptr; | 106 ArcAppWindowLauncherItemController* controller_ = nullptr; |
| 112 | 107 |
| 113 DISALLOW_COPY_AND_ASSIGN(ArcAppWindow); | 108 DISALLOW_COPY_AND_ASSIGN(ArcAppWindow); |
| 114 }; | 109 }; |
| 115 | 110 |
| 116 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_WINDOW_H_ | 111 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_WINDOW_H_ |
| OLD | NEW |