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

Side by Side Diff: extensions/browser/app_window/app_window.h

Issue 2738373002: Enhance chrome.app.window API with window background color (Closed)
Patch Set: Created 3 years, 9 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
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 EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_H_ 5 #ifndef EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_H_
6 #define EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_H_ 6 #define EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 CreateParams(const CreateParams& other); 147 CreateParams(const CreateParams& other);
148 ~CreateParams(); 148 ~CreateParams();
149 149
150 WindowType window_type; 150 WindowType window_type;
151 Frame frame; 151 Frame frame;
152 152
153 bool has_frame_color; 153 bool has_frame_color;
154 SkColor active_frame_color; 154 SkColor active_frame_color;
155 SkColor inactive_frame_color; 155 SkColor inactive_frame_color;
156 bool alpha_enabled; 156 bool alpha_enabled;
157 SkColor background_color;
157 bool is_ime_window; 158 bool is_ime_window;
158 159
159 // The initial content/inner bounds specification (excluding any window 160 // The initial content/inner bounds specification (excluding any window
160 // decorations). 161 // decorations).
161 BoundsSpecification content_spec; 162 BoundsSpecification content_spec;
162 163
163 // The initial window/outer bounds specification (including window 164 // The initial window/outer bounds specification (including window
164 // decorations). 165 // decorations).
165 BoundsSpecification window_spec; 166 BoundsSpecification window_spec;
166 167
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 // the renderer. 357 // the renderer.
357 void GetSerializedState(base::DictionaryValue* properties) const; 358 void GetSerializedState(base::DictionaryValue* properties) const;
358 359
359 // Notifies the window's contents that the render view is ready and it can 360 // Notifies the window's contents that the render view is ready and it can
360 // unblock resource requests. 361 // unblock resource requests.
361 void NotifyRenderViewReady(); 362 void NotifyRenderViewReady();
362 363
363 // Whether the app window wants to be alpha enabled. 364 // Whether the app window wants to be alpha enabled.
364 bool requested_alpha_enabled() const { return requested_alpha_enabled_; } 365 bool requested_alpha_enabled() const { return requested_alpha_enabled_; }
365 366
367 // Set background color.
Reilly Grant (use Gerrit) 2017/03/10 18:39:18 This is a getter, it cannot "set" anything.
368 SkColor backgroundColor() const { return background_color_; }
369
366 // Whether the app window is created by IME extensions. 370 // Whether the app window is created by IME extensions.
367 // TODO(bshe): rename to hide_app_window_in_launcher if it is not used 371 // TODO(bshe): rename to hide_app_window_in_launcher if it is not used
368 // anywhere other than app_window_launcher_controller after M45. Otherwise, 372 // anywhere other than app_window_launcher_controller after M45. Otherwise,
369 // remove this TODO. 373 // remove this TODO.
370 bool is_ime_window() const { return is_ime_window_; } 374 bool is_ime_window() const { return is_ime_window_; }
371 375
372 bool show_in_shelf() const { return show_in_shelf_; } 376 bool show_in_shelf() const { return show_in_shelf_; }
373 377
374 const GURL& window_icon_url() const { return window_icon_url_; } 378 const GURL& window_icon_url() const { return window_icon_url_; }
375 379
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 // Cache the desired value of the always-on-top property. When windows enter 555 // Cache the desired value of the always-on-top property. When windows enter
552 // fullscreen or overlap the Windows taskbar, this property will be 556 // fullscreen or overlap the Windows taskbar, this property will be
553 // automatically and silently switched off for security reasons. It is 557 // automatically and silently switched off for security reasons. It is
554 // reinstated when the window exits fullscreen and moves away from the 558 // reinstated when the window exits fullscreen and moves away from the
555 // taskbar. 559 // taskbar.
556 bool cached_always_on_top_; 560 bool cached_always_on_top_;
557 561
558 // Whether |alpha_enabled| was set in the CreateParams. 562 // Whether |alpha_enabled| was set in the CreateParams.
559 bool requested_alpha_enabled_; 563 bool requested_alpha_enabled_;
560 564
565 // Set background color
Reilly Grant (use Gerrit) 2017/03/10 18:39:18 As in the IDL file, please be more specific.
566 SkColor background_color_;
567
561 // Whether |is_ime_window| was set in the CreateParams. 568 // Whether |is_ime_window| was set in the CreateParams.
562 bool is_ime_window_; 569 bool is_ime_window_;
563 570
564 // Whether |show_in_shelf| was set in the CreateParams. 571 // Whether |show_in_shelf| was set in the CreateParams.
565 bool show_in_shelf_; 572 bool show_in_shelf_;
566 573
567 // Icon URL to be used for setting the window icon. If not empty, 574 // Icon URL to be used for setting the window icon. If not empty,
568 // app_icon_ will be fetched and set using this URL and will have 575 // app_icon_ will be fetched and set using this URL and will have
569 // app_icon_image_ as a badge. 576 // app_icon_image_ as a badge.
570 GURL window_icon_url_; 577 GURL window_icon_url_;
571 578
572 // PlzNavigate: this is called when the first navigation is ready to commit. 579 // PlzNavigate: this is called when the first navigation is ready to commit.
573 base::Closure on_first_commit_callback_; 580 base::Closure on_first_commit_callback_;
574 581
575 base::WeakPtrFactory<AppWindow> image_loader_ptr_factory_; 582 base::WeakPtrFactory<AppWindow> image_loader_ptr_factory_;
576 583
577 DISALLOW_COPY_AND_ASSIGN(AppWindow); 584 DISALLOW_COPY_AND_ASSIGN(AppWindow);
578 }; 585 };
579 586
580 } // namespace extensions 587 } // namespace extensions
581 588
582 #endif // EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_H_ 589 #endif // EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698