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

Side by Side Diff: components/exo/surface.cc

Issue 1408263006: chromeos: Add ArcInputBridge to components/arc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@arcxx
Patch Set: fixed build.gn file Created 5 years 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 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 #include "components/exo/surface.h" 5 #include "components/exo/surface.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "base/trace_event/trace_event_argument.h" 10 #include "base/trace_event/trace_event_argument.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // Surface, public: 81 // Surface, public:
82 82
83 Surface::Surface() 83 Surface::Surface()
84 : aura::Window(new EmptyWindowDelegate), 84 : aura::Window(new EmptyWindowDelegate),
85 has_pending_contents_(false), 85 has_pending_contents_(false),
86 needs_commit_surface_hierarchy_(false), 86 needs_commit_surface_hierarchy_(false),
87 update_contents_after_successful_compositing_(false), 87 update_contents_after_successful_compositing_(false),
88 compositor_(nullptr), 88 compositor_(nullptr),
89 delegate_(nullptr) { 89 delegate_(nullptr) {
90 SetType(ui::wm::WINDOW_TYPE_CONTROL); 90 SetType(ui::wm::WINDOW_TYPE_CONTROL);
91 SetName("ExoSurface");
91 Init(ui::LAYER_SOLID_COLOR); 92 Init(ui::LAYER_SOLID_COLOR);
92 set_owned_by_parent(false); 93 set_owned_by_parent(false);
93 SetName("ExoSurface");
94 } 94 }
95 95
96 Surface::~Surface() { 96 Surface::~Surface() {
97 FOR_EACH_OBSERVER(SurfaceObserver, observers_, OnSurfaceDestroying(this)); 97 FOR_EACH_OBSERVER(SurfaceObserver, observers_, OnSurfaceDestroying(this));
98 98
99 layer()->SetShowSolidColorContent(); 99 layer()->SetShowSolidColorContent();
100 100
101 if (compositor_) 101 if (compositor_)
102 compositor_->RemoveObserver(this); 102 compositor_->RemoveObserver(this);
103 103
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 // of the surface next time the compositor successfully ends compositing. 401 // of the surface next time the compositor successfully ends compositing.
402 update_contents_after_successful_compositing_ = true; 402 update_contents_after_successful_compositing_ = true;
403 } 403 }
404 404
405 void Surface::OnCompositingShuttingDown(ui::Compositor* compositor) { 405 void Surface::OnCompositingShuttingDown(ui::Compositor* compositor) {
406 compositor->RemoveObserver(this); 406 compositor->RemoveObserver(this);
407 compositor_ = nullptr; 407 compositor_ = nullptr;
408 } 408 }
409 409
410 } // namespace exo 410 } // namespace exo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698