Commit 689f89a0 authored by Alan Cutter's avatar Alan Cutter Committed by Commit Bot

Clean up redundant getter for AppMenuButton

This is a simple clean up CL that has no changes in behaviour.
The bubble anchor code can use the recently added ButtonProvider
instead of a specialised getter on FrameView.

Change-Id: Ia067afe36f07c3ce4b77344c28f6467e4a9a1801
Bug: 811178
Reviewed-on: https://chromium-review.googlesource.com/950642Reviewed-by: default avatarcalamity <calamity@chromium.org>
Reviewed-by: default avatarTrent Apted <tapted@chromium.org>
Commit-Queue: Alan Cutter <alancutter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541727}
parent f7445dd7
...@@ -679,7 +679,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( ...@@ -679,7 +679,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
break; break;
case IDC_HOSTED_APP_MENU_APP_INFO: case IDC_HOSTED_APP_MENU_APP_INFO:
ShowPageInfoDialog(browser_->tab_strip_model()->GetActiveWebContents(), ShowPageInfoDialog(browser_->tab_strip_model()->GetActiveWebContents(),
bubble_anchor_util::kHostedAppMenu); bubble_anchor_util::kAppMenuButton);
break; break;
default: default:
......
...@@ -19,7 +19,7 @@ namespace bubble_anchor_util { ...@@ -19,7 +19,7 @@ namespace bubble_anchor_util {
// Used as a parameter of GetPageInfoAnchorView(). // Used as a parameter of GetPageInfoAnchorView().
enum Anchor { enum Anchor {
kLocationBar, kLocationBar,
kHostedAppMenu, kAppMenuButton,
}; };
// Offset from the window edge to show bubbles when there is no location bar. // Offset from the window edge to show bubbles when there is no location bar.
......
...@@ -28,11 +28,8 @@ views::View* GetPageInfoAnchorView(Browser* browser, Anchor anchor) { ...@@ -28,11 +28,8 @@ views::View* GetPageInfoAnchorView(Browser* browser, Anchor anchor) {
if (anchor == kLocationBar) if (anchor == kLocationBar)
return browser_view->GetLocationBarView()->GetSecurityBubbleAnchorView(); return browser_view->GetLocationBarView()->GetSecurityBubbleAnchorView();
if (anchor == kHostedAppMenu) { if (anchor == kAppMenuButton)
auto* frame_view = static_cast<BrowserNonClientFrameView*>( return browser_view->button_provider()->GetAppMenuButton();
browser_view->GetWidget()->non_client_view()->frame_view());
return frame_view->GetHostedAppMenuView();
}
NOTREACHED(); NOTREACHED();
return nullptr; return nullptr;
} }
......
...@@ -86,11 +86,6 @@ views::View* BrowserNonClientFrameView::GetProfileSwitcherView() const { ...@@ -86,11 +86,6 @@ views::View* BrowserNonClientFrameView::GetProfileSwitcherView() const {
return profile_switcher_.view(); return profile_switcher_.view();
} }
views::View* BrowserNonClientFrameView::GetHostedAppMenuView() {
NOTREACHED();
return nullptr;
}
void BrowserNonClientFrameView::UpdateClientArea() {} void BrowserNonClientFrameView::UpdateClientArea() {}
void BrowserNonClientFrameView::UpdateMinimumSize() {} void BrowserNonClientFrameView::UpdateMinimumSize() {}
......
...@@ -71,9 +71,6 @@ class BrowserNonClientFrameView : public views::NonClientFrameView, ...@@ -71,9 +71,6 @@ class BrowserNonClientFrameView : public views::NonClientFrameView,
// doesn't. // doesn't.
views::View* GetProfileSwitcherView() const; views::View* GetProfileSwitcherView() const;
// Returns the hosted app menu, asserts that it is present.
virtual views::View* GetHostedAppMenuView();
// Provided for mus. Updates the client-area of the WindowTreeHostMus. // Provided for mus. Updates the client-area of the WindowTreeHostMus.
virtual void UpdateClientArea(); virtual void UpdateClientArea();
......
...@@ -245,11 +245,6 @@ void BrowserNonClientFrameViewAsh::UpdateMinimumSize() { ...@@ -245,11 +245,6 @@ void BrowserNonClientFrameViewAsh::UpdateMinimumSize() {
} }
} }
views::View* BrowserNonClientFrameViewAsh::GetHostedAppMenuView() {
DCHECK(hosted_app_button_container_);
return hosted_app_button_container_;
}
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// views::NonClientFrameView: // views::NonClientFrameView:
......
...@@ -47,7 +47,6 @@ class BrowserNonClientFrameViewAsh : public BrowserNonClientFrameView, ...@@ -47,7 +47,6 @@ class BrowserNonClientFrameViewAsh : public BrowserNonClientFrameView,
int GetThemeBackgroundXInset() const override; int GetThemeBackgroundXInset() const override;
void UpdateThrobber(bool running) override; void UpdateThrobber(bool running) override;
void UpdateMinimumSize() override; void UpdateMinimumSize() override;
views::View* GetHostedAppMenuView() override;
// views::NonClientFrameView: // views::NonClientFrameView:
gfx::Rect GetBoundsForClientView() const override; gfx::Rect GetBoundsForClientView() const override;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment