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

Side by Side Diff: chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm

Issue 10703061: chrome/browser/ui: Put browser_dialogs.h into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
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 #import "chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.h" 5 #import "chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/mac/bundle_locations.h" 9 #include "base/mac/bundle_locations.h"
10 #import "base/mac/mac_util.h" 10 #import "base/mac/mac_util.h"
(...skipping 18 matching lines...) Expand all
29 #include "chrome/browser/ui/collected_cookies_infobar_delegate.h" 29 #include "chrome/browser/ui/collected_cookies_infobar_delegate.h"
30 #include "chrome/browser/ui/tab_contents/tab_contents.h" 30 #include "chrome/browser/ui/tab_contents/tab_contents.h"
31 #include "chrome/common/chrome_notification_types.h" 31 #include "chrome/common/chrome_notification_types.h"
32 #include "chrome/common/pref_names.h" 32 #include "chrome/common/pref_names.h"
33 #include "content/public/browser/notification_details.h" 33 #include "content/public/browser/notification_details.h"
34 #include "content/public/browser/notification_source.h" 34 #include "content/public/browser/notification_source.h"
35 #include "content/public/browser/web_contents.h" 35 #include "content/public/browser/web_contents.h"
36 #include "content/public/browser/web_contents_view.h" 36 #include "content/public/browser/web_contents_view.h"
37 #include "grit/generated_resources.h" 37 #include "grit/generated_resources.h"
38 #include "grit/theme_resources_standard.h" 38 #include "grit/theme_resources_standard.h"
39 #include "third_party/apple_sample_code/ImageAndTextCell.h"
39 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" 40 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h"
40 #import "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h" 41 #import "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h"
41 #include "third_party/apple_sample_code/ImageAndTextCell.h"
42 #include "ui/base/l10n/l10n_util_mac.h" 42 #include "ui/base/l10n/l10n_util_mac.h"
43 #include "ui/base/resource/resource_bundle.h" 43 #include "ui/base/resource/resource_bundle.h"
44 #include "ui/gfx/image/image.h" 44 #include "ui/gfx/image/image.h"
45 #include "ui/gfx/image/image_skia.h" 45 #include "ui/gfx/image/image_skia.h"
46 #include "ui/gfx/image/image_skia_util_mac.h" 46 #include "ui/gfx/image/image_skia_util_mac.h"
47 47
48 namespace { 48 namespace {
49 // Colors for the infobar. 49 // Colors for the infobar.
50 const double kBannerGradientColorTop[3] = 50 const double kBannerGradientColorTop[3] =
51 {255.0 / 255.0, 242.0 / 255.0, 183.0 / 255.0}; 51 {255.0 / 255.0, 242.0 / 255.0, 183.0 / 255.0};
52 const double kBannerGradientColorBottom[3] = 52 const double kBannerGradientColorBottom[3] =
53 {250.0 / 255.0, 230.0 / 255.0, 145.0 / 255.0}; 53 {250.0 / 255.0, 230.0 / 255.0, 145.0 / 255.0};
54 const double kBannerStrokeColor = 135.0 / 255.0; 54 const double kBannerStrokeColor = 135.0 / 255.0;
55 55
56 enum TabViewItemIndices { 56 enum TabViewItemIndices {
57 kAllowedCookiesTabIndex = 0, 57 kAllowedCookiesTabIndex = 0,
58 kBlockedCookiesTabIndex 58 kBlockedCookiesTabIndex
59 }; 59 };
60 60
61 } // namespace 61 } // namespace
62 62
63 namespace browser { 63 namespace chrome {
64 64
65 // Declared in browser_dialogs.h so others don't have to depend on our header. 65 // Declared in browser_dialogs.h so others don't have to depend on our header.
66 void ShowCollectedCookiesDialog(TabContents* tab_contents) { 66 void ShowCollectedCookiesDialog(TabContents* tab_contents) {
67 // Deletes itself on close. 67 // Deletes itself on close.
68 new CollectedCookiesMac( 68 new CollectedCookiesMac(
69 tab_contents->web_contents()->GetView()->GetTopLevelNativeWindow(), 69 tab_contents->web_contents()->GetView()->GetTopLevelNativeWindow(),
70 tab_contents); 70 tab_contents);
71 } 71 }
72 72
73 } // namespace browser 73 } // namespace chrome
74 74
75 #pragma mark Bridge between the constrained window delegate and the sheet 75 #pragma mark Bridge between the constrained window delegate and the sheet
76 76
77 // The delegate used to forward the events from the sheet to the constrained 77 // The delegate used to forward the events from the sheet to the constrained
78 // window delegate. 78 // window delegate.
79 @interface CollectedCookiesSheetBridge : NSObject { 79 @interface CollectedCookiesSheetBridge : NSObject {
80 CollectedCookiesMac* collectedCookies_; // weak 80 CollectedCookiesMac* collectedCookies_; // weak
81 } 81 }
82 - (id)initWithCollectedCookiesMac:(CollectedCookiesMac*)collectedCookies; 82 - (id)initWithCollectedCookiesMac:(CollectedCookiesMac*)collectedCookies;
83 - (void)sheetDidEnd:(NSWindow*)sheet 83 - (void)sheetDidEnd:(NSWindow*)sheet
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 treeController = blockedTreeController_; 558 treeController = blockedTreeController_;
559 break; 559 break;
560 default: 560 default:
561 NOTREACHED(); 561 NOTREACHED();
562 return; 562 return;
563 } 563 }
564 [detailsViewController_ configureBindingsForTreeController:treeController]; 564 [detailsViewController_ configureBindingsForTreeController:treeController];
565 } 565 }
566 566
567 @end 567 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/about_ipc_dialog.mm ('k') | chrome/browser/ui/cocoa/extensions/extension_installed_bubble_bridge.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698