In this paper, we consider a control architecture for a mobile robot equipped with visual sensors to pursue a target object in an environment with convex-shaped obstacles. The pursuit involves crucial occlusion avoidance and field of view maintenance, referred to as visual safety. Our goal is to achieve this safety through a multi-layered control architecture consisting of a planning layer and a safety layer. We propose functions that represent occlusion avoidance and field of view maintenance and derive conditions for these to act as control barrier functions. Utilizing these functions, we implement an optimal control at the planning layer and an optimization-based control at the safety layer. The effectiveness of this method is verified through two tasks: guiding the target object into a target location and preventing the target object from entering a target location.