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

Side by Side Diff: components/exo/shell_surface.h

Issue 2664403004: Use pixel coordinates for shadow underlay bounds (Closed)
Patch Set: update Created 3 years, 10 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
« no previous file with comments | « no previous file | components/exo/shell_surface.cc » ('j') | components/exo/wayland/server.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <deque> 8 #include <deque>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 // Overridden from ui::EventHandler: 234 // Overridden from ui::EventHandler:
235 void OnKeyEvent(ui::KeyEvent* event) override; 235 void OnKeyEvent(ui::KeyEvent* event) override;
236 void OnMouseEvent(ui::MouseEvent* event) override; 236 void OnMouseEvent(ui::MouseEvent* event) override;
237 237
238 // Overridden from ui::AcceleratorTarget: 238 // Overridden from ui::AcceleratorTarget:
239 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; 239 bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
240 240
241 aura::Window* shadow_overlay() { return shadow_overlay_; } 241 aura::Window* shadow_overlay() { return shadow_overlay_; }
242 aura::Window* shadow_underlay() { return shadow_underlay_; } 242 aura::Window* shadow_underlay() { return shadow_underlay_; }
243 243
244 void set_shadow_underlay_in_shell_surface(bool enable) {
245 shadow_underlay_in_shell_surface_ = enable;
246 }
247
244 private: 248 private:
245 class ScopedConfigure; 249 class ScopedConfigure;
246 class ScopedAnimationsDisabled; 250 class ScopedAnimationsDisabled;
247 251
248 // Surface state associated with each configure request. 252 // Surface state associated with each configure request.
249 struct Config { 253 struct Config {
250 uint32_t serial; 254 uint32_t serial;
251 gfx::Vector2d origin_offset; 255 gfx::Vector2d origin_offset;
252 int resize_component; 256 int resize_component;
253 }; 257 };
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 aura::Window* shadow_overlay_ = nullptr; 318 aura::Window* shadow_overlay_ = nullptr;
315 aura::Window* shadow_underlay_ = nullptr; 319 aura::Window* shadow_underlay_ = nullptr;
316 std::unique_ptr<ui::EventHandler> shadow_underlay_event_handler_; 320 std::unique_ptr<ui::EventHandler> shadow_underlay_event_handler_;
317 gfx::Rect shadow_content_bounds_; 321 gfx::Rect shadow_content_bounds_;
318 float shadow_background_opacity_ = 1.0; 322 float shadow_background_opacity_ = 1.0;
319 std::deque<Config> pending_configs_; 323 std::deque<Config> pending_configs_;
320 std::unique_ptr<ash::WindowResizer> resizer_; 324 std::unique_ptr<ash::WindowResizer> resizer_;
321 std::unique_ptr<ScopedAnimationsDisabled> scoped_animations_disabled_; 325 std::unique_ptr<ScopedAnimationsDisabled> scoped_animations_disabled_;
322 int top_inset_height_ = 0; 326 int top_inset_height_ = 0;
323 int pending_top_inset_height_ = 0; 327 int pending_top_inset_height_ = 0;
328 // TODO(oshima): Remove this once NYC migration is complete.
329 bool shadow_underlay_in_shell_surface_ = true;
324 330
325 DISALLOW_COPY_AND_ASSIGN(ShellSurface); 331 DISALLOW_COPY_AND_ASSIGN(ShellSurface);
326 }; 332 };
327 333
328 } // namespace exo 334 } // namespace exo
329 335
330 #endif // COMPONENTS_EXO_SHELL_SURFACE_H_ 336 #endif // COMPONENTS_EXO_SHELL_SURFACE_H_
OLDNEW
« no previous file with comments | « no previous file | components/exo/shell_surface.cc » ('j') | components/exo/wayland/server.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698