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

Side by Side Diff: chrome/browser/ui/views/location_bar/location_icon_view.cc

Issue 2397273002: Show a custom page info bubble for chrome-devtools:// URLs (Closed)
Patch Set: Fix mac build Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/location_bar/location_icon_view.h" 5 #include "chrome/browser/ui/views/location_bar/location_icon_view.h"
6 6
7 #include "chrome/browser/ssl/chrome_security_state_model_client.h" 7 #include "chrome/browser/ssl/chrome_security_state_model_client.h"
8 #include "chrome/browser/ui/view_ids.h" 8 #include "chrome/browser/ui/view_ids.h"
9 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" 9 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
10 #include "chrome/browser/ui/views/website_settings/website_settings_popup_view.h " 10 #include "chrome/browser/ui/views/website_settings/website_settings_popup_view.h "
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 ui::Clipboard::IsSupportedClipboardType(ui::CLIPBOARD_TYPE_SELECTION)) { 50 ui::Clipboard::IsSupportedClipboardType(ui::CLIPBOARD_TYPE_SELECTION)) {
51 base::string16 text; 51 base::string16 text;
52 ui::Clipboard::GetForCurrentThread()->ReadText( 52 ui::Clipboard::GetForCurrentThread()->ReadText(
53 ui::CLIPBOARD_TYPE_SELECTION, &text); 53 ui::CLIPBOARD_TYPE_SELECTION, &text);
54 text = OmniboxView::SanitizeTextForPaste(text); 54 text = OmniboxView::SanitizeTextForPaste(text);
55 OmniboxEditModel* model = location_bar_->GetOmniboxView()->model(); 55 OmniboxEditModel* model = location_bar_->GetOmniboxView()->model();
56 if (model->CanPasteAndGo(text)) 56 if (model->CanPasteAndGo(text))
57 model->PasteAndGo(text); 57 model->PasteAndGo(text);
58 } 58 }
59 59
60 suppress_mouse_released_action_ = WebsiteSettingsPopupView::IsPopupShowing(); 60 suppress_mouse_released_action_ =
61 WebsiteSettingsPopupView::GetShownPopupType() !=
62 WebsiteSettingsPopupView::POPUP_NONE;
61 return true; 63 return true;
62 } 64 }
63 65
64 bool LocationIconView::OnMouseDragged(const ui::MouseEvent& event) { 66 bool LocationIconView::OnMouseDragged(const ui::MouseEvent& event) {
65 location_bar_->GetOmniboxView()->CloseOmniboxPopup(); 67 location_bar_->GetOmniboxView()->CloseOmniboxPopup();
66 return false; 68 return false;
67 } 69 }
68 70
69 void LocationIconView::OnMouseReleased(const ui::MouseEvent& event) { 71 void LocationIconView::OnMouseReleased(const ui::MouseEvent& event) {
70 if (event.IsOnlyMiddleMouseButton()) 72 if (event.IsOnlyMiddleMouseButton())
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 return size; 164 return size;
163 } 165 }
164 166
165 void LocationIconView::OnClickOrTap(const ui::LocatedEvent& event) { 167 void LocationIconView::OnClickOrTap(const ui::LocatedEvent& event) {
166 // Do not show page info if the user has been editing the location bar or the 168 // Do not show page info if the user has been editing the location bar or the
167 // location bar is at the NTP. 169 // location bar is at the NTP.
168 if (location_bar_->GetOmniboxView()->IsEditingOrEmpty()) 170 if (location_bar_->GetOmniboxView()->IsEditingOrEmpty())
169 return; 171 return;
170 ProcessLocatedEvent(event); 172 ProcessLocatedEvent(event);
171 } 173 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698