| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ORIGIN_CHIP_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ORIGIN_CHIP_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ORIGIN_CHIP_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ORIGIN_CHIP_VIEW_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/safe_browsing/ui_manager.h" | 8 #include "chrome/browser/safe_browsing/ui_manager.h" |
| 9 #include "chrome/browser/ui/toolbar/toolbar_model.h" | 9 #include "chrome/browser/ui/toolbar/toolbar_model.h" |
| 10 #include "chrome/browser/ui/views/location_bar/location_icon_view.h" | 10 #include "chrome/browser/ui/views/location_bar/location_icon_view.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 virtual gfx::Size GetPreferredSize() OVERRIDE; | 67 virtual gfx::Size GetPreferredSize() OVERRIDE; |
| 68 virtual void Layout() OVERRIDE; | 68 virtual void Layout() OVERRIDE; |
| 69 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 69 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
| 70 | 70 |
| 71 // views::ButtonListener: | 71 // views::ButtonListener: |
| 72 virtual void ButtonPressed(views::Button* sender, | 72 virtual void ButtonPressed(views::Button* sender, |
| 73 const ui::Event& event) OVERRIDE; | 73 const ui::Event& event) OVERRIDE; |
| 74 | 74 |
| 75 // views::DragController: | 75 // views::DragController: |
| 76 virtual void WriteDragDataForView(View* sender, | 76 virtual void WriteDragDataForView(View* sender, |
| 77 const gfx::Point& press_pt, | 77 const gfx::PointF& press_pt, |
| 78 OSExchangeData* data) OVERRIDE; | 78 OSExchangeData* data) OVERRIDE; |
| 79 virtual int GetDragOperationsForView(View* sender, | 79 virtual int GetDragOperationsForView(View* sender, |
| 80 const gfx::Point& p) OVERRIDE; | 80 const gfx::PointF& p) OVERRIDE; |
| 81 virtual bool CanStartDragForView(View* sender, | 81 virtual bool CanStartDragForView(View* sender, |
| 82 const gfx::Point& press_pt, | 82 const gfx::PointF& press_pt, |
| 83 const gfx::Point& p) OVERRIDE; | 83 const gfx::PointF& p) OVERRIDE; |
| 84 | 84 |
| 85 // SafeBrowsingUIManager::Observer: | 85 // SafeBrowsingUIManager::Observer: |
| 86 virtual void OnSafeBrowsingHit( | 86 virtual void OnSafeBrowsingHit( |
| 87 const SafeBrowsingUIManager::UnsafeResource& resource) OVERRIDE; | 87 const SafeBrowsingUIManager::UnsafeResource& resource) OVERRIDE; |
| 88 virtual void OnSafeBrowsingMatch( | 88 virtual void OnSafeBrowsingMatch( |
| 89 const SafeBrowsingUIManager::UnsafeResource& resource) OVERRIDE; | 89 const SafeBrowsingUIManager::UnsafeResource& resource) OVERRIDE; |
| 90 | 90 |
| 91 private: | 91 private: |
| 92 ToolbarView* toolbar_view_; | 92 ToolbarView* toolbar_view_; |
| 93 views::Label* host_label_; | 93 views::Label* host_label_; |
| 94 LocationIconView* location_icon_view_; | 94 LocationIconView* location_icon_view_; |
| 95 scoped_ptr<views::Painter> ev_background_painter_; | 95 scoped_ptr<views::Painter> ev_background_painter_; |
| 96 scoped_ptr<views::Painter> broken_ssl_background_painter_; | 96 scoped_ptr<views::Painter> broken_ssl_background_painter_; |
| 97 scoped_ptr<views::Painter> malware_background_painter_; | 97 scoped_ptr<views::Painter> malware_background_painter_; |
| 98 // Will point to one of the background painters, or NULL if the state of the | 98 // Will point to one of the background painters, or NULL if the state of the |
| 99 // chip has no background. | 99 // chip has no background. |
| 100 views::Painter* painter_; | 100 views::Painter* painter_; |
| 101 bool showing_16x16_icon_; | 101 bool showing_16x16_icon_; |
| 102 scoped_ptr<ToolbarOriginChipExtensionIcon> extension_icon_; | 102 scoped_ptr<ToolbarOriginChipExtensionIcon> extension_icon_; |
| 103 GURL url_displayed_; | 103 GURL url_displayed_; |
| 104 ToolbarModel::SecurityLevel security_level_; | 104 ToolbarModel::SecurityLevel security_level_; |
| 105 bool url_malware_; | 105 bool url_malware_; |
| 106 | 106 |
| 107 DISALLOW_COPY_AND_ASSIGN(ToolbarOriginChipView); | 107 DISALLOW_COPY_AND_ASSIGN(ToolbarOriginChipView); |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ORIGIN_CHIP_VIEW_H_ | 110 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ORIGIN_CHIP_VIEW_H_ |
| OLD | NEW |