• Tessa Nijssen's avatar
    [Views] Refactoring MenuController::CalculateBubbleMenuBounds() · f0dd1da7
    Tessa Nijssen authored
    The following changes were made:
      - Store reference to monitor bounds
      - Rename variable to determine child menu position
      - Renamed anchor bounds
      - Renamed menu bounds
      - Removed Calls to gfx::Rect's origin
    
    Store Reference to Monitor Bounds
    state_.monitor_bounds -> monitor_bounds
    
    Renamed Variable to Determine Child Menu Position
    create_on_the_right -> create_on_right
    Also cleaned up initialization.
    
    Renamed Anchor Bounds
    owner_bounds -> anchor_bounds
    The variable is described as being the anchor bounds in a comment above
    its instantiation.
    
    Renamed Menu Bounds
    pref -> menu_bounds
    More descriptive name.
    
    Removed Calls to gfx::Rect's Origin
    origin().x() -> x()
    origin().y() -> y()
    Calls to x() and y() return the origin's x and y positions. Adding a
    call to the origin is unnecessary.
    
    Change-Id: I29d9b669d567b3d978da721c1b34b9399a1e8178
    Reviewed-on: https://chromium-review.googlesource.com/1145544Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
    Reviewed-by: default avatarScott Violet <sky@chromium.org>
    Commit-Queue: Peter Kasting <pkasting@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#585528}
    f0dd1da7
menu_controller.cc 104 KB