Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1024)

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 2672463003: Remove dead code since PDFWebContentsHelper::ShowOpenInReaderPrompt isn't called anymore. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/location_bar/location_bar_view.cc
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index 6fa564c80ed6cf52220c34dac82c0389ce3cc1ed..0fcbb434a617f35cf43a36432cc0693c4b701cd9 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -40,7 +40,6 @@
#include "chrome/browser/ui/views/location_bar/keyword_hint_view.h"
#include "chrome/browser/ui/views/location_bar/location_bar_layout.h"
#include "chrome/browser/ui/views/location_bar/location_icon_view.h"
-#include "chrome/browser/ui/views/location_bar/open_pdf_in_reader_view.h"
#include "chrome/browser/ui/views/location_bar/page_action_image_view.h"
#include "chrome/browser/ui/views/location_bar/page_action_with_badge_view.h"
#include "chrome/browser/ui/views/location_bar/selected_keyword_view.h"
@@ -131,7 +130,6 @@ LocationBarView::LocationBarView(Browser* browser,
selected_keyword_view_(nullptr),
keyword_hint_view_(nullptr),
zoom_view_(nullptr),
- open_pdf_in_reader_view_(nullptr),
manage_passwords_icon_view_(nullptr),
save_credit_card_icon_view_(nullptr),
translate_icon_view_(nullptr),
@@ -251,9 +249,6 @@ void LocationBarView::Init() {
zoom_view_->Init();
AddChildView(zoom_view_);
- open_pdf_in_reader_view_ = new OpenPDFInReaderView();
- AddChildView(open_pdf_in_reader_view_);
-
manage_passwords_icon_view_ = new ManagePasswordsIconViews(command_updater());
manage_passwords_icon_view_->Init();
AddChildView(manage_passwords_icon_view_);
@@ -475,7 +470,6 @@ gfx::Size LocationBarView::GetPreferredSize() const {
int trailing_width = edge_thickness;
trailing_width += IncrementalMinimumWidth(star_view_) +
IncrementalMinimumWidth(translate_icon_view_) +
- IncrementalMinimumWidth(open_pdf_in_reader_view_) +
IncrementalMinimumWidth(save_credit_card_icon_view_) +
IncrementalMinimumWidth(manage_passwords_icon_view_) +
IncrementalMinimumWidth(zoom_view_);
@@ -555,10 +549,6 @@ void LocationBarView::Layout() {
trailing_decorations.AddDecoration(vertical_padding, location_height,
translate_icon_view_);
}
- if (open_pdf_in_reader_view_->visible()) {
- trailing_decorations.AddDecoration(vertical_padding, location_height,
- open_pdf_in_reader_view_);
- }
if (save_credit_card_icon_view_->visible()) {
trailing_decorations.AddDecoration(vertical_padding, location_height,
save_credit_card_icon_view_);
@@ -654,9 +644,6 @@ void LocationBarView::Update(const WebContents* contents) {
RefreshTranslateIcon();
RefreshSaveCreditCardIconView();
RefreshManagePasswordsIconView();
- WebContents* web_contents_for_sub_views =
- GetToolbarModel()->input_in_progress() ? nullptr : GetWebContents();
- open_pdf_in_reader_view_->Update(web_contents_for_sub_views);
if (star_view_)
UpdateBookmarkStarVisibility();
@@ -780,9 +767,7 @@ bool LocationBarView::RefreshPageActionViews() {
page_action_views_.push_back(std::move(page_action_view));
}
- View* right_anchor = open_pdf_in_reader_view_;
- if (!right_anchor)
- right_anchor = star_view_;
+ View* right_anchor = star_view_;
DCHECK(right_anchor);
// |page_action_views_| are ordered right-to-left. Add them as children in
@@ -1038,13 +1023,6 @@ bool LocationBarView::ShowPageActionPopup(
return extension_action_view_controller->ExecuteAction(grant_tab_permissions);
}
-void LocationBarView::UpdateOpenPDFInReaderPrompt() {
- open_pdf_in_reader_view_->Update(
- GetToolbarModel()->input_in_progress() ? nullptr : GetWebContents());
- Layout();
- SchedulePaint();
-}
-
void LocationBarView::SaveStateToContents(WebContents* contents) {
omnibox_view_->SaveStateToTab(contents);
}

Powered by Google App Engine
This is Rietveld 408576698