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

Side by Side Diff: base/bind_internal.h

Issue 822713002: Update from https://crrev.com/309415 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 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 // This file was GENERATED by command: 1 // This file was GENERATED by command:
2 // pump.py bind_internal.h.pump 2 // pump.py bind_internal.h.pump
3 // DO NOT EDIT BY HAND!!! 3 // DO NOT EDIT BY HAND!!!
4 4
5 5
6 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 6 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
7 // Use of this source code is governed by a BSD-style license that can be 7 // Use of this source code is governed by a BSD-style license that can be
8 // found in the LICENSE file. 8 // found in the LICENSE file.
9 9
10 #ifndef BASE_BIND_INTERNAL_H_ 10 #ifndef BASE_BIND_INTERNAL_H_
(...skipping 1832 matching lines...) Expand 10 before | Expand all | Expand 10 after
1843 template <typename Runnable, typename RunType> 1843 template <typename Runnable, typename RunType>
1844 struct BindState<Runnable, RunType, void()> : public BindStateBase { 1844 struct BindState<Runnable, RunType, void()> : public BindStateBase {
1845 typedef Runnable RunnableType; 1845 typedef Runnable RunnableType;
1846 typedef false_type IsWeakCall; 1846 typedef false_type IsWeakCall;
1847 typedef Invoker<0, BindState, RunType> InvokerType; 1847 typedef Invoker<0, BindState, RunType> InvokerType;
1848 typedef typename InvokerType::UnboundRunType UnboundRunType; 1848 typedef typename InvokerType::UnboundRunType UnboundRunType;
1849 explicit BindState(const Runnable& runnable) 1849 explicit BindState(const Runnable& runnable)
1850 : runnable_(runnable) { 1850 : runnable_(runnable) {
1851 } 1851 }
1852 1852
1853 virtual ~BindState() { } 1853 RunnableType runnable_;
1854 1854
1855 RunnableType runnable_; 1855 private:
1856 ~BindState() override { }
1857
1856 }; 1858 };
1857 1859
1858 template <typename Runnable, typename RunType, typename P1> 1860 template <typename Runnable, typename RunType, typename P1>
1859 struct BindState<Runnable, RunType, void(P1)> : public BindStateBase { 1861 struct BindState<Runnable, RunType, void(P1)> : public BindStateBase {
1860 typedef Runnable RunnableType; 1862 typedef Runnable RunnableType;
1861 typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall; 1863 typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall;
1862 typedef Invoker<1, BindState, RunType> InvokerType; 1864 typedef Invoker<1, BindState, RunType> InvokerType;
1863 typedef typename InvokerType::UnboundRunType UnboundRunType; 1865 typedef typename InvokerType::UnboundRunType UnboundRunType;
1864 1866
1865 // Convenience typedefs for bound argument types. 1867 // Convenience typedefs for bound argument types.
1866 typedef UnwrapTraits<P1> Bound1UnwrapTraits; 1868 typedef UnwrapTraits<P1> Bound1UnwrapTraits;
1867 1869
1868 BindState(const Runnable& runnable, const P1& p1) 1870 BindState(const Runnable& runnable, const P1& p1)
1869 : runnable_(runnable), 1871 : runnable_(runnable),
1870 p1_(p1) { 1872 p1_(p1) {
1871 MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_); 1873 MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);
1872 } 1874 }
1873 1875
1874 virtual ~BindState() { MaybeRefcount<HasIsMethodTag<Runnable>::value, 1876 RunnableType runnable_;
1877 P1 p1_;
1878
1879 private:
1880 ~BindState() override { MaybeRefcount<HasIsMethodTag<Runnable>::value,
1875 P1>::Release(p1_); } 1881 P1>::Release(p1_); }
1876 1882
1877 RunnableType runnable_;
1878 P1 p1_;
1879 }; 1883 };
1880 1884
1881 template <typename Runnable, typename RunType, typename P1, typename P2> 1885 template <typename Runnable, typename RunType, typename P1, typename P2>
1882 struct BindState<Runnable, RunType, void(P1, P2)> : public BindStateBase { 1886 struct BindState<Runnable, RunType, void(P1, P2)> : public BindStateBase {
1883 typedef Runnable RunnableType; 1887 typedef Runnable RunnableType;
1884 typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall; 1888 typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall;
1885 typedef Invoker<2, BindState, RunType> InvokerType; 1889 typedef Invoker<2, BindState, RunType> InvokerType;
1886 typedef typename InvokerType::UnboundRunType UnboundRunType; 1890 typedef typename InvokerType::UnboundRunType UnboundRunType;
1887 1891
1888 // Convenience typedefs for bound argument types. 1892 // Convenience typedefs for bound argument types.
1889 typedef UnwrapTraits<P1> Bound1UnwrapTraits; 1893 typedef UnwrapTraits<P1> Bound1UnwrapTraits;
1890 typedef UnwrapTraits<P2> Bound2UnwrapTraits; 1894 typedef UnwrapTraits<P2> Bound2UnwrapTraits;
1891 1895
1892 BindState(const Runnable& runnable, const P1& p1, const P2& p2) 1896 BindState(const Runnable& runnable, const P1& p1, const P2& p2)
1893 : runnable_(runnable), 1897 : runnable_(runnable),
1894 p1_(p1), 1898 p1_(p1),
1895 p2_(p2) { 1899 p2_(p2) {
1896 MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_); 1900 MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);
1897 } 1901 }
1898 1902
1899 virtual ~BindState() { MaybeRefcount<HasIsMethodTag<Runnable>::value,
1900 P1>::Release(p1_); }
1901
1902 RunnableType runnable_; 1903 RunnableType runnable_;
1903 P1 p1_; 1904 P1 p1_;
1904 P2 p2_; 1905 P2 p2_;
1906
1907 private:
1908 ~BindState() override { MaybeRefcount<HasIsMethodTag<Runnable>::value,
1909 P1>::Release(p1_); }
1910
1905 }; 1911 };
1906 1912
1907 template <typename Runnable, typename RunType, typename P1, typename P2, 1913 template <typename Runnable, typename RunType, typename P1, typename P2,
1908 typename P3> 1914 typename P3>
1909 struct BindState<Runnable, RunType, void(P1, P2, P3)> : public BindStateBase { 1915 struct BindState<Runnable, RunType, void(P1, P2, P3)> : public BindStateBase {
1910 typedef Runnable RunnableType; 1916 typedef Runnable RunnableType;
1911 typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall; 1917 typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall;
1912 typedef Invoker<3, BindState, RunType> InvokerType; 1918 typedef Invoker<3, BindState, RunType> InvokerType;
1913 typedef typename InvokerType::UnboundRunType UnboundRunType; 1919 typedef typename InvokerType::UnboundRunType UnboundRunType;
1914 1920
1915 // Convenience typedefs for bound argument types. 1921 // Convenience typedefs for bound argument types.
1916 typedef UnwrapTraits<P1> Bound1UnwrapTraits; 1922 typedef UnwrapTraits<P1> Bound1UnwrapTraits;
1917 typedef UnwrapTraits<P2> Bound2UnwrapTraits; 1923 typedef UnwrapTraits<P2> Bound2UnwrapTraits;
1918 typedef UnwrapTraits<P3> Bound3UnwrapTraits; 1924 typedef UnwrapTraits<P3> Bound3UnwrapTraits;
1919 1925
1920 BindState(const Runnable& runnable, const P1& p1, const P2& p2, const P3& p3) 1926 BindState(const Runnable& runnable, const P1& p1, const P2& p2, const P3& p3)
1921 : runnable_(runnable), 1927 : runnable_(runnable),
1922 p1_(p1), 1928 p1_(p1),
1923 p2_(p2), 1929 p2_(p2),
1924 p3_(p3) { 1930 p3_(p3) {
1925 MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_); 1931 MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);
1926 } 1932 }
1927 1933
1928 virtual ~BindState() { MaybeRefcount<HasIsMethodTag<Runnable>::value,
1929 P1>::Release(p1_); }
1930
1931 RunnableType runnable_; 1934 RunnableType runnable_;
1932 P1 p1_; 1935 P1 p1_;
1933 P2 p2_; 1936 P2 p2_;
1934 P3 p3_; 1937 P3 p3_;
1938
1939 private:
1940 ~BindState() override { MaybeRefcount<HasIsMethodTag<Runnable>::value,
1941 P1>::Release(p1_); }
1942
1935 }; 1943 };
1936 1944
1937 template <typename Runnable, typename RunType, typename P1, typename P2, 1945 template <typename Runnable, typename RunType, typename P1, typename P2,
1938 typename P3, typename P4> 1946 typename P3, typename P4>
1939 struct BindState<Runnable, RunType, void(P1, P2, P3, 1947 struct BindState<Runnable, RunType, void(P1, P2, P3,
1940 P4)> : public BindStateBase { 1948 P4)> : public BindStateBase {
1941 typedef Runnable RunnableType; 1949 typedef Runnable RunnableType;
1942 typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall; 1950 typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall;
1943 typedef Invoker<4, BindState, RunType> InvokerType; 1951 typedef Invoker<4, BindState, RunType> InvokerType;
1944 typedef typename InvokerType::UnboundRunType UnboundRunType; 1952 typedef typename InvokerType::UnboundRunType UnboundRunType;
1945 1953
1946 // Convenience typedefs for bound argument types. 1954 // Convenience typedefs for bound argument types.
1947 typedef UnwrapTraits<P1> Bound1UnwrapTraits; 1955 typedef UnwrapTraits<P1> Bound1UnwrapTraits;
1948 typedef UnwrapTraits<P2> Bound2UnwrapTraits; 1956 typedef UnwrapTraits<P2> Bound2UnwrapTraits;
1949 typedef UnwrapTraits<P3> Bound3UnwrapTraits; 1957 typedef UnwrapTraits<P3> Bound3UnwrapTraits;
1950 typedef UnwrapTraits<P4> Bound4UnwrapTraits; 1958 typedef UnwrapTraits<P4> Bound4UnwrapTraits;
1951 1959
1952 BindState(const Runnable& runnable, const P1& p1, const P2& p2, const P3& p3, 1960 BindState(const Runnable& runnable, const P1& p1, const P2& p2, const P3& p3,
1953 const P4& p4) 1961 const P4& p4)
1954 : runnable_(runnable), 1962 : runnable_(runnable),
1955 p1_(p1), 1963 p1_(p1),
1956 p2_(p2), 1964 p2_(p2),
1957 p3_(p3), 1965 p3_(p3),
1958 p4_(p4) { 1966 p4_(p4) {
1959 MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_); 1967 MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);
1960 } 1968 }
1961 1969
1962 virtual ~BindState() { MaybeRefcount<HasIsMethodTag<Runnable>::value,
1963 P1>::Release(p1_); }
1964
1965 RunnableType runnable_; 1970 RunnableType runnable_;
1966 P1 p1_; 1971 P1 p1_;
1967 P2 p2_; 1972 P2 p2_;
1968 P3 p3_; 1973 P3 p3_;
1969 P4 p4_; 1974 P4 p4_;
1975
1976 private:
1977 ~BindState() override { MaybeRefcount<HasIsMethodTag<Runnable>::value,
1978 P1>::Release(p1_); }
1979
1970 }; 1980 };
1971 1981
1972 template <typename Runnable, typename RunType, typename P1, typename P2, 1982 template <typename Runnable, typename RunType, typename P1, typename P2,
1973 typename P3, typename P4, typename P5> 1983 typename P3, typename P4, typename P5>
1974 struct BindState<Runnable, RunType, void(P1, P2, P3, P4, 1984 struct BindState<Runnable, RunType, void(P1, P2, P3, P4,
1975 P5)> : public BindStateBase { 1985 P5)> : public BindStateBase {
1976 typedef Runnable RunnableType; 1986 typedef Runnable RunnableType;
1977 typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall; 1987 typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall;
1978 typedef Invoker<5, BindState, RunType> InvokerType; 1988 typedef Invoker<5, BindState, RunType> InvokerType;
1979 typedef typename InvokerType::UnboundRunType UnboundRunType; 1989 typedef typename InvokerType::UnboundRunType UnboundRunType;
1980 1990
1981 // Convenience typedefs for bound argument types. 1991 // Convenience typedefs for bound argument types.
1982 typedef UnwrapTraits<P1> Bound1UnwrapTraits; 1992 typedef UnwrapTraits<P1> Bound1UnwrapTraits;
1983 typedef UnwrapTraits<P2> Bound2UnwrapTraits; 1993 typedef UnwrapTraits<P2> Bound2UnwrapTraits;
1984 typedef UnwrapTraits<P3> Bound3UnwrapTraits; 1994 typedef UnwrapTraits<P3> Bound3UnwrapTraits;
1985 typedef UnwrapTraits<P4> Bound4UnwrapTraits; 1995 typedef UnwrapTraits<P4> Bound4UnwrapTraits;
1986 typedef UnwrapTraits<P5> Bound5UnwrapTraits; 1996 typedef UnwrapTraits<P5> Bound5UnwrapTraits;
1987 1997
1988 BindState(const Runnable& runnable, const P1& p1, const P2& p2, const P3& p3, 1998 BindState(const Runnable& runnable, const P1& p1, const P2& p2, const P3& p3,
1989 const P4& p4, const P5& p5) 1999 const P4& p4, const P5& p5)
1990 : runnable_(runnable), 2000 : runnable_(runnable),
1991 p1_(p1), 2001 p1_(p1),
1992 p2_(p2), 2002 p2_(p2),
1993 p3_(p3), 2003 p3_(p3),
1994 p4_(p4), 2004 p4_(p4),
1995 p5_(p5) { 2005 p5_(p5) {
1996 MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_); 2006 MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);
1997 } 2007 }
1998 2008
1999 virtual ~BindState() { MaybeRefcount<HasIsMethodTag<Runnable>::value,
2000 P1>::Release(p1_); }
2001
2002 RunnableType runnable_; 2009 RunnableType runnable_;
2003 P1 p1_; 2010 P1 p1_;
2004 P2 p2_; 2011 P2 p2_;
2005 P3 p3_; 2012 P3 p3_;
2006 P4 p4_; 2013 P4 p4_;
2007 P5 p5_; 2014 P5 p5_;
2015
2016 private:
2017 ~BindState() override { MaybeRefcount<HasIsMethodTag<Runnable>::value,
2018 P1>::Release(p1_); }
2019
2008 }; 2020 };
2009 2021
2010 template <typename Runnable, typename RunType, typename P1, typename P2, 2022 template <typename Runnable, typename RunType, typename P1, typename P2,
2011 typename P3, typename P4, typename P5, typename P6> 2023 typename P3, typename P4, typename P5, typename P6>
2012 struct BindState<Runnable, RunType, void(P1, P2, P3, P4, P5, 2024 struct BindState<Runnable, RunType, void(P1, P2, P3, P4, P5,
2013 P6)> : public BindStateBase { 2025 P6)> : public BindStateBase {
2014 typedef Runnable RunnableType; 2026 typedef Runnable RunnableType;
2015 typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall; 2027 typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall;
2016 typedef Invoker<6, BindState, RunType> InvokerType; 2028 typedef Invoker<6, BindState, RunType> InvokerType;
2017 typedef typename InvokerType::UnboundRunType UnboundRunType; 2029 typedef typename InvokerType::UnboundRunType UnboundRunType;
(...skipping 11 matching lines...) Expand all
2029 : runnable_(runnable), 2041 : runnable_(runnable),
2030 p1_(p1), 2042 p1_(p1),
2031 p2_(p2), 2043 p2_(p2),
2032 p3_(p3), 2044 p3_(p3),
2033 p4_(p4), 2045 p4_(p4),
2034 p5_(p5), 2046 p5_(p5),
2035 p6_(p6) { 2047 p6_(p6) {
2036 MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_); 2048 MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);
2037 } 2049 }
2038 2050
2039 virtual ~BindState() { MaybeRefcount<HasIsMethodTag<Runnable>::value,
2040 P1>::Release(p1_); }
2041
2042 RunnableType runnable_; 2051 RunnableType runnable_;
2043 P1 p1_; 2052 P1 p1_;
2044 P2 p2_; 2053 P2 p2_;
2045 P3 p3_; 2054 P3 p3_;
2046 P4 p4_; 2055 P4 p4_;
2047 P5 p5_; 2056 P5 p5_;
2048 P6 p6_; 2057 P6 p6_;
2058
2059 private:
2060 ~BindState() override { MaybeRefcount<HasIsMethodTag<Runnable>::value,
2061 P1>::Release(p1_); }
2062
2049 }; 2063 };
2050 2064
2051 template <typename Runnable, typename RunType, typename P1, typename P2, 2065 template <typename Runnable, typename RunType, typename P1, typename P2,
2052 typename P3, typename P4, typename P5, typename P6, typename P7> 2066 typename P3, typename P4, typename P5, typename P6, typename P7>
2053 struct BindState<Runnable, RunType, void(P1, P2, P3, P4, P5, P6, 2067 struct BindState<Runnable, RunType, void(P1, P2, P3, P4, P5, P6,
2054 P7)> : public BindStateBase { 2068 P7)> : public BindStateBase {
2055 typedef Runnable RunnableType; 2069 typedef Runnable RunnableType;
2056 typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall; 2070 typedef IsWeakMethod<HasIsMethodTag<Runnable>::value, P1> IsWeakCall;
2057 typedef Invoker<7, BindState, RunType> InvokerType; 2071 typedef Invoker<7, BindState, RunType> InvokerType;
2058 typedef typename InvokerType::UnboundRunType UnboundRunType; 2072 typedef typename InvokerType::UnboundRunType UnboundRunType;
(...skipping 13 matching lines...) Expand all
2072 p1_(p1), 2086 p1_(p1),
2073 p2_(p2), 2087 p2_(p2),
2074 p3_(p3), 2088 p3_(p3),
2075 p4_(p4), 2089 p4_(p4),
2076 p5_(p5), 2090 p5_(p5),
2077 p6_(p6), 2091 p6_(p6),
2078 p7_(p7) { 2092 p7_(p7) {
2079 MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_); 2093 MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);
2080 } 2094 }
2081 2095
2082 virtual ~BindState() { MaybeRefcount<HasIsMethodTag<Runnable>::value,
2083 P1>::Release(p1_); }
2084
2085 RunnableType runnable_; 2096 RunnableType runnable_;
2086 P1 p1_; 2097 P1 p1_;
2087 P2 p2_; 2098 P2 p2_;
2088 P3 p3_; 2099 P3 p3_;
2089 P4 p4_; 2100 P4 p4_;
2090 P5 p5_; 2101 P5 p5_;
2091 P6 p6_; 2102 P6 p6_;
2092 P7 p7_; 2103 P7 p7_;
2104
2105 private:
2106 ~BindState() override { MaybeRefcount<HasIsMethodTag<Runnable>::value,
2107 P1>::Release(p1_); }
2108
2093 }; 2109 };
2094 2110
2095 } // namespace internal 2111 } // namespace internal
2096 } // namespace base 2112 } // namespace base
2097 2113
2098 #endif // BASE_BIND_INTERNAL_H_ 2114 #endif // BASE_BIND_INTERNAL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698