OLD | NEW |
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/content_setting_bubble_contents.h" | 5 #include "chrome/browser/ui/views/content_setting_bubble_contents.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 class ContentSettingBubbleContents::Favicon : public views::ImageView { | 67 class ContentSettingBubbleContents::Favicon : public views::ImageView { |
68 public: | 68 public: |
69 Favicon(const gfx::Image& image, | 69 Favicon(const gfx::Image& image, |
70 ContentSettingBubbleContents* parent, | 70 ContentSettingBubbleContents* parent, |
71 views::Link* link); | 71 views::Link* link); |
72 virtual ~Favicon(); | 72 virtual ~Favicon(); |
73 | 73 |
74 private: | 74 private: |
75 // views::View overrides: | 75 // views::View overrides: |
76 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; | 76 virtual bool OnMousePressed(const ui::MouseEvent& event) override; |
77 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; | 77 virtual void OnMouseReleased(const ui::MouseEvent& event) override; |
78 virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event) OVERRIDE; | 78 virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event) override; |
79 | 79 |
80 ContentSettingBubbleContents* parent_; | 80 ContentSettingBubbleContents* parent_; |
81 views::Link* link_; | 81 views::Link* link_; |
82 }; | 82 }; |
83 | 83 |
84 ContentSettingBubbleContents::Favicon::Favicon( | 84 ContentSettingBubbleContents::Favicon::Favicon( |
85 const gfx::Image& image, | 85 const gfx::Image& image, |
86 ContentSettingBubbleContents* parent, | 86 ContentSettingBubbleContents* parent, |
87 views::Link* link) | 87 views::Link* link) |
88 : parent_(parent), | 88 : parent_(parent), |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 // Make sure the width is at least kMinMediaMenuButtonWidth. The | 499 // Make sure the width is at least kMinMediaMenuButtonWidth. The |
500 // maximum width will be clamped by kMaxContentsWidth of the view. | 500 // maximum width will be clamped by kMaxContentsWidth of the view. |
501 menu_width = std::max(kMinMediaMenuButtonWidth, menu_width + margins); | 501 menu_width = std::max(kMinMediaMenuButtonWidth, menu_width + margins); |
502 | 502 |
503 for (MediaMenuPartsMap::const_iterator i = media_menus_.begin(); | 503 for (MediaMenuPartsMap::const_iterator i = media_menus_.begin(); |
504 i != media_menus_.end(); ++i) { | 504 i != media_menus_.end(); ++i) { |
505 i->first->SetMinSize(gfx::Size(menu_width, 0)); | 505 i->first->SetMinSize(gfx::Size(menu_width, 0)); |
506 i->first->SetMaxSize(gfx::Size(menu_width, 0)); | 506 i->first->SetMaxSize(gfx::Size(menu_width, 0)); |
507 } | 507 } |
508 } | 508 } |
OLD | NEW |