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

Side by Side Diff: apps/app_window.h

Issue 190533006: Add support for transparent background API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Mac (no-Aura) browsertest Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 APPS_APP_WINDOW_H_ 5 #ifndef APPS_APP_WINDOW_H_
6 #define APPS_APP_WINDOW_H_ 6 #define APPS_APP_WINDOW_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 struct CreateParams { 144 struct CreateParams {
145 CreateParams(); 145 CreateParams();
146 ~CreateParams(); 146 ~CreateParams();
147 147
148 WindowType window_type; 148 WindowType window_type;
149 Frame frame; 149 Frame frame;
150 150
151 bool has_frame_color; 151 bool has_frame_color;
152 SkColor active_frame_color; 152 SkColor active_frame_color;
153 SkColor inactive_frame_color; 153 SkColor inactive_frame_color;
154 bool transparent_background; // Only supported on ash. 154 bool alpha_enabled; // Only supported on ash.
jackhou1 2014/07/22 05:35:35 There's probably no need for a comment here any mo
garykac 2014/07/25 22:50:31 Done.
155 155
156 // The initial content/inner bounds specification (excluding any window 156 // The initial content/inner bounds specification (excluding any window
157 // decorations). 157 // decorations).
158 BoundsSpecification content_spec; 158 BoundsSpecification content_spec;
159 159
160 // The initial window/outer bounds specification (including window 160 // The initial window/outer bounds specification (including window
161 // decorations). 161 // decorations).
162 BoundsSpecification window_spec; 162 BoundsSpecification window_spec;
163 163
164 std::string window_key; 164 std::string window_key;
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 bool IsAlwaysOnTop() const; 359 bool IsAlwaysOnTop() const;
360 360
361 // Retrieve the current state of the app window as a dictionary, to pass to 361 // Retrieve the current state of the app window as a dictionary, to pass to
362 // the renderer. 362 // the renderer.
363 void GetSerializedState(base::DictionaryValue* properties) const; 363 void GetSerializedState(base::DictionaryValue* properties) const;
364 364
365 // Called by the window API when events can be sent to the window for this 365 // Called by the window API when events can be sent to the window for this
366 // app. 366 // app.
367 void WindowEventsReady(); 367 void WindowEventsReady();
368 368
369 // Whether the app window wants a transparent background. 369 // Whether the app window wants to be alpha enabled.
370 bool requested_transparent_background() const { 370 bool requested_alpha_enabled() const { return requested_alpha_enabled_; }
371 return requested_transparent_background_;
372 }
373 371
374 protected: 372 protected:
375 virtual ~AppWindow(); 373 virtual ~AppWindow();
376 374
377 private: 375 private:
378 // PlatformAppBrowserTest needs access to web_contents() 376 // PlatformAppBrowserTest needs access to web_contents()
379 friend class extensions::PlatformAppBrowserTest; 377 friend class extensions::PlatformAppBrowserTest;
380 378
381 // content::WebContentsDelegate implementation. 379 // content::WebContentsDelegate implementation.
382 virtual void CloseContents(content::WebContents* contents) OVERRIDE; 380 virtual void CloseContents(content::WebContents* contents) OVERRIDE;
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 // Whether the delayed Show() call was for an active or inactive window. 562 // Whether the delayed Show() call was for an active or inactive window.
565 ShowType delayed_show_type_; 563 ShowType delayed_show_type_;
566 564
567 // Cache the desired value of the always-on-top property. When windows enter 565 // Cache the desired value of the always-on-top property. When windows enter
568 // fullscreen or overlap the Windows taskbar, this property will be 566 // fullscreen or overlap the Windows taskbar, this property will be
569 // automatically and silently switched off for security reasons. It is 567 // automatically and silently switched off for security reasons. It is
570 // reinstated when the window exits fullscreen and moves away from the 568 // reinstated when the window exits fullscreen and moves away from the
571 // taskbar. 569 // taskbar.
572 bool cached_always_on_top_; 570 bool cached_always_on_top_;
573 571
574 // Whether |transparent_background| was set in the CreateParams. 572 // Whether |alpha_enabled| was set in the CreateParams.
575 bool requested_transparent_background_; 573 bool requested_alpha_enabled_;
576 574
577 DISALLOW_COPY_AND_ASSIGN(AppWindow); 575 DISALLOW_COPY_AND_ASSIGN(AppWindow);
578 }; 576 };
579 577
580 } // namespace apps 578 } // namespace apps
581 579
582 #endif // APPS_APP_WINDOW_H_ 580 #endif // APPS_APP_WINDOW_H_
OLDNEW
« no previous file with comments | « no previous file | apps/app_window.cc » ('j') | chrome/browser/extensions/api/app_window/app_window_api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698