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

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

Issue 2640123004: Initial support for native accessibility in ARC (Closed)
Patch Set: Experimental changes 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
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 <utility> 7 #include <utility>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 655
656 // VSync parameters updates are generated at the start of a new swap. Move 656 // VSync parameters updates are generated at the start of a new swap. Move
657 // the swapping presentation callbacks to swapped callbacks so they fire 657 // the swapping presentation callbacks to swapped callbacks so they fire
658 // at the next VSync parameters update as that will contain the presentation 658 // at the next VSync parameters update as that will contain the presentation
659 // time for the previous frame. 659 // time for the previous frame.
660 swapped_presentation_callbacks_.splice(swapped_presentation_callbacks_.end(), 660 swapped_presentation_callbacks_.splice(swapped_presentation_callbacks_.end(),
661 swapping_presentation_callbacks_); 661 swapping_presentation_callbacks_);
662 } 662 }
663 663
664 //////////////////////////////////////////////////////////////////////////////// 664 ////////////////////////////////////////////////////////////////////////////////
665 // Accessibility
666 //
667 void Surface::UpdateAXTreeID(int32_t id) {
668 LOG(ERROR) << "trying to update surface!" << id;
669 for (SurfaceObserver& observer : observers_) {
670 LOG(ERROR) << "update surface!" << id;
671 observer.OnSurfaceAXTreeChanged(id);
672 }
673 }
674
675 ////////////////////////////////////////////////////////////////////////////////
665 // Buffer, private: 676 // Buffer, private:
666 677
667 Surface::State::State() : input_region(SkIRect::MakeLargest()) {} 678 Surface::State::State() : input_region(SkIRect::MakeLargest()) {}
668 679
669 Surface::State::~State() = default; 680 Surface::State::~State() = default;
670 681
671 bool Surface::State::operator==(const State& other) { 682 bool Surface::State::operator==(const State& other) {
672 return (other.crop == crop && alpha == other.alpha && 683 return (other.crop == crop && alpha == other.alpha &&
673 other.blend_mode == blend_mode && other.viewport == viewport && 684 other.blend_mode == blend_mode && other.viewport == viewport &&
674 other.opaque_region == opaque_region && 685 other.opaque_region == opaque_region &&
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 854
844 int64_t Surface::GetPropertyInternal(const void* key, 855 int64_t Surface::GetPropertyInternal(const void* key,
845 int64_t default_value) const { 856 int64_t default_value) const {
846 std::map<const void*, Value>::const_iterator iter = prop_map_.find(key); 857 std::map<const void*, Value>::const_iterator iter = prop_map_.find(key);
847 if (iter == prop_map_.end()) 858 if (iter == prop_map_.end())
848 return default_value; 859 return default_value;
849 return iter->second.value; 860 return iter->second.value;
850 } 861 }
851 862
852 } // namespace exo 863 } // namespace exo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698