OLD | NEW |
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. Use of this |
2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
3 // LICENSE file. | 3 // LICENSE file. |
4 | 4 |
5 // Implementation of BlockedPopupContainer and its corresponding View | 5 // Implementation of BlockedPopupContainer and its corresponding View |
6 // class. The BlockedPopupContainer is the sort of Model class which owns the | 6 // class. The BlockedPopupContainer is the sort of Model class which owns the |
7 // blocked popups' TabContents (but like most Chromium interface code, it there | 7 // blocked popups' TabContents (but like most Chromium interface code, it there |
8 // isn't a strict Model/View separation), and BlockedPopupContainerView | 8 // isn't a strict Model/View separation), and BlockedPopupContainerView |
9 // presents the user interface controls, creates and manages the popup menu. | 9 // presents the user interface controls, creates and manages the popup menu. |
10 | 10 |
11 #include "chrome/browser/views/blocked_popup_container.h" | 11 #include "chrome/browser/views/blocked_popup_container.h" |
12 | 12 |
13 #include <math.h> | 13 #include <math.h> |
14 | 14 |
15 #include "chrome/app/theme/theme_resources.h" | 15 #include "grit/theme_resources.h" |
16 #include "chrome/browser/profile.h" | 16 #include "chrome/browser/profile.h" |
17 #include "chrome/browser/tab_contents/tab_contents.h" | 17 #include "chrome/browser/tab_contents/tab_contents.h" |
18 #include "chrome/common/gfx/chrome_canvas.h" | 18 #include "chrome/common/gfx/chrome_canvas.h" |
19 #include "chrome/common/gfx/path.h" | 19 #include "chrome/common/gfx/path.h" |
20 #include "chrome/common/l10n_util.h" | 20 #include "chrome/common/l10n_util.h" |
21 #include "chrome/common/notification_service.h" | 21 #include "chrome/common/notification_service.h" |
22 #include "chrome/common/pref_names.h" | 22 #include "chrome/common/pref_names.h" |
23 #include "chrome/common/resource_bundle.h" | 23 #include "chrome/common/resource_bundle.h" |
24 #include "chrome/views/background.h" | 24 #include "chrome/views/background.h" |
25 #include "chrome/views/button.h" | 25 #include "chrome/views/button.h" |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 | 498 |
499 void BlockedPopupContainer::CloseEachTabContents() { | 499 void BlockedPopupContainer::CloseEachTabContents() { |
500 while (!blocked_popups_.empty()) { | 500 while (!blocked_popups_.empty()) { |
501 blocked_popups_.back().first->set_delegate(NULL); | 501 blocked_popups_.back().first->set_delegate(NULL); |
502 blocked_popups_.back().first->CloseContents(); | 502 blocked_popups_.back().first->CloseContents(); |
503 blocked_popups_.pop_back(); | 503 blocked_popups_.pop_back(); |
504 } | 504 } |
505 | 505 |
506 blocked_popups_.clear(); | 506 blocked_popups_.clear(); |
507 } | 507 } |
OLD | NEW |