Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Unified Diff: components/exo/shell_surface.h

Issue 2883193002: WIP
Patch Set: git cl try Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/exo/shell_surface.h
diff --git a/components/exo/shell_surface.h b/components/exo/shell_surface.h
index 7443e48dc2d7696b23b2286d1a0335ac14381626..779b293278352288bacb3471b12cbe146088c491 100644
--- a/components/exo/shell_surface.h
+++ b/components/exo/shell_surface.h
@@ -144,6 +144,12 @@ class ShellSurface : public SurfaceDelegate,
// Set title for surface.
void SetTitle(const base::string16& title);
+ // Set chunk of surface icon.
+ void SetIconChunk(uint32_t flags, const std::string& unsafe_icon_png);
+
+ // Reset icon for surface.
+ void ResetIcon();
+
// Sets the system modality.
void SetSystemModal(bool system_modal);
@@ -213,6 +219,18 @@ class ShellSurface : public SurfaceDelegate,
// |window| must not be nullptr.
static Surface* GetMainSurface(const aura::Window* window);
+ // Returns true if |key| defines property that contains compressed png icon
+ // for a window.
+ static bool IsUnsafeIconPngDataKey(const void* key);
+
+ // Returns custom icon for the window in compressed png format. This data must
+ // be decoded in chrome/browser context using IPC ImageDecoder.
+ static const std::string* GetUnsafeIconPngData(const aura::Window* window);
+
+ // Sets custom icon for the window in compressed png format.
+ static void SetUnsafeIconPngData(aura::Window* window,
+ std::string* unsage_icon_png_data);
+
// Returns a trace value representing the state of the surface.
std::unique_ptr<base::trace_event::TracedValue> AsTracedValue() const;
@@ -349,6 +367,8 @@ class ShellSurface : public SurfaceDelegate,
bool shadow_enabled_ = false;
bool pending_show_widget_ = false;
base::string16 title_;
+ std::string unsafe_icon_png_;
+ std::string unsafe_icon_png_builder_;
std::string application_id_;
gfx::Rect geometry_;
gfx::Rect pending_geometry_;
« no previous file with comments | « chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc ('k') | components/exo/shell_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698