Skip to content

Commit

Permalink
Simplify two browser type checks by using Browser's is_type_* accessors.
Browse files Browse the repository at this point in the history
R=sky@chromium.org

Review URL: https://codereview.chromium.org/10981002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159259 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
tfarina@chromium.org committed Sep 28, 2012
1 parent 1b0f888 commit 5f81588
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ BrowserLauncherItemController* BrowserLauncherItemController::Create(

Type type;
std::string app_id;
if (browser->type() == Browser::TYPE_TABBED ||
browser->type() == Browser::TYPE_POPUP) {
if (browser->is_type_tabbed() || browser->is_type_popup()) {
type = TYPE_TABBED;
} else if (browser->is_app()) {
if (browser->is_type_panel()) {
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/window_sizer/window_sizer_ash.cc
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ bool WindowSizer::GetBoundsOverrideAsh(const gfx::Rect& specified_bounds,
if (!GetSavedWindowBounds(bounds_in_screen))
GetDefaultWindowBounds(bounds_in_screen);

if (browser_ != NULL && browser_->type() == Browser::TYPE_TABBED) {
if (browser_ && browser_->is_type_tabbed()) {
gfx::Rect work_area =
monitor_info_provider_->GetMonitorWorkAreaMatching(*bounds_in_screen);
// This is a window / app. See if there is no window and try to place it.
Expand Down

0 comments on commit 5f81588

Please sign in to comment.