As usual,
P
n (
n
≥
1) denotes the path on
n vertices, and
C
n (
n
≥
3) denotes the cycle on
n vertices. For a family
MJX-tex-caligraphicscriptH of graphs, we say that a graph
G is
MJX-tex-caligraphicscriptH‐free if no induced subgraph of
G is isomorphic to any graph in
MJX-tex-caligraphicscriptH. We present a decomposition theorem for the class of
(
P
7
,
C
4
,
C
5
)‐free graphs; in fact, we give a complete structural characterization of
(
P
7
,
C
4
,
C
5
)‐free graphs that do not admit a clique‐cutset. We use this decomposition theorem to show that the class of
(
P
7
,
C
4
,
C
5
)‐free graphs is
χ‐bounded by a linear function (more precisely, every
(
P
7
,
C
4
,
C
5
)‐free graph
G satisfies
χ
(
G
)
≤
3
/
2
ω
(
G
)). We also use the decomposition theorem to construct an
O
(
n
3
) algorithm for the minimum coloring problem, an
O
(
n
2
m
) algorithm for the maximum weight stable set problem, and an
O
(
n
3
) algorithm for the maximum weight clique problem for this class, where
n denotes the number of vertices and
m the number of edges of the input graph.