If the anime came first, what is considered "canon"? In the case of many anime where the manga came first, things that are included in the anime but not the manga (such as filler arcs) seem to be not considered totally canon to the series, indicating that manga is generally what is considered to set canon. One example of this is the Quincy arc in Bleach. For series where the anime came first, such as Code Geass, is the anime then considered to set canon?
What is considered canon is generally decided by the author(s) or license holder. I think you need to get a better idea of the definition of canon. 


  the original work from which the fan fiction author borrows


or 


  a descriptor of specific incidents, relationships, or story arcs that take place within the overall canon



Wikipedia (Original revision where definitions came from)


So, to directly answer your question, if there was only a manga and anime, and the manga came first, then the manga is canon. I say only, because many manga and anime are based off of light novels or visual novels. In that case, the light novel or visual novel would be canon.

If the anime came first, then it will probably be whatever the license holder decides is canon. This is an assumption, because I think anime writers give up the rights to their work.