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

Side by Side Diff: chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm

Issue 1775223002: Prepare chrome/ for compilation with OS X 10.7 deployment target. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile errors. Fix null-window error. Created 4 years, 9 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 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 #import "chrome/browser/ui/cocoa/website_settings/website_settings_bubble_contro ller.h" 5 #import "chrome/browser/ui/cocoa/website_settings/website_settings_bubble_contro ller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #import <AppKit/AppKit.h> 9 #import <AppKit/AppKit.h>
10 10
(...skipping 23 matching lines...) Expand all
34 #include "components/prefs/pref_service.h" 34 #include "components/prefs/pref_service.h"
35 #include "content/public/browser/cert_store.h" 35 #include "content/public/browser/cert_store.h"
36 #include "content/public/browser/page_navigator.h" 36 #include "content/public/browser/page_navigator.h"
37 #include "content/public/browser/ssl_host_state_delegate.h" 37 #include "content/public/browser/ssl_host_state_delegate.h"
38 #include "content/public/browser/user_metrics.h" 38 #include "content/public/browser/user_metrics.h"
39 #include "content/public/browser/web_contents.h" 39 #include "content/public/browser/web_contents.h"
40 #include "grit/components_chromium_strings.h" 40 #include "grit/components_chromium_strings.h"
41 #include "grit/components_google_chrome_strings.h" 41 #include "grit/components_google_chrome_strings.h"
42 #include "grit/components_strings.h" 42 #include "grit/components_strings.h"
43 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTw eaker.h" 43 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTw eaker.h"
44 #include "ui/base/cocoa/cocoa_base_utils.h"
44 #import "ui/base/cocoa/controls/hyperlink_button_cell.h" 45 #import "ui/base/cocoa/controls/hyperlink_button_cell.h"
45 #import "ui/base/cocoa/flipped_view.h" 46 #import "ui/base/cocoa/flipped_view.h"
46 #import "ui/base/cocoa/hover_image_button.h" 47 #import "ui/base/cocoa/hover_image_button.h"
47 #include "ui/base/l10n/l10n_util.h" 48 #include "ui/base/l10n/l10n_util.h"
48 #include "ui/base/resource/resource_bundle.h" 49 #include "ui/base/resource/resource_bundle.h"
49 #import "ui/gfx/mac/coordinate_conversion.h" 50 #import "ui/gfx/mac/coordinate_conversion.h"
50 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" 51 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h"
51 #include "ui/resources/grit/ui_resources.h" 52 #include "ui/resources/grit/ui_resources.h"
52 53
53 using ChosenObjectInfoPtr = scoped_ptr<WebsiteSettingsUI::ChosenObjectInfo>; 54 using ChosenObjectInfoPtr = scoped_ptr<WebsiteSettingsUI::ChosenObjectInfo>;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 // Takes in the parent window, which should be a BrowserWindow, and gets the 111 // Takes in the parent window, which should be a BrowserWindow, and gets the
111 // proper anchor point for the bubble. The returned point is in screen 112 // proper anchor point for the bubble. The returned point is in screen
112 // coordinates. 113 // coordinates.
113 NSPoint AnchorPointForWindow(NSWindow* parent) { 114 NSPoint AnchorPointForWindow(NSWindow* parent) {
114 BrowserWindowController* controller = [parent windowController]; 115 BrowserWindowController* controller = [parent windowController];
115 NSPoint origin = NSZeroPoint; 116 NSPoint origin = NSZeroPoint;
116 if ([controller isKindOfClass:[BrowserWindowController class]]) { 117 if ([controller isKindOfClass:[BrowserWindowController class]]) {
117 LocationBarViewMac* location_bar = [controller locationBarBridge]; 118 LocationBarViewMac* location_bar = [controller locationBarBridge];
118 if (location_bar) { 119 if (location_bar) {
119 NSPoint bubble_point = location_bar->GetPageInfoBubblePoint(); 120 NSPoint bubble_point = location_bar->GetPageInfoBubblePoint();
120 origin = [parent convertBaseToScreen:bubble_point]; 121 origin = ui::ConvertPointFromWindowToScreen(parent, bubble_point);
121 } 122 }
122 } 123 }
123 return origin; 124 return origin;
124 } 125 }
125 126
126 } // namespace 127 } // namespace
127 128
128 @interface ChosenObjectDeleteButton : HoverImageButton { 129 @interface ChosenObjectDeleteButton : HoverImageButton {
129 @private 130 @private
130 ChosenObjectInfoPtr objectInfo_; 131 ChosenObjectInfoPtr objectInfo_;
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
1162 void WebsiteSettingsUIBridge::SetPermissionInfo( 1163 void WebsiteSettingsUIBridge::SetPermissionInfo(
1163 const PermissionInfoList& permission_info_list, 1164 const PermissionInfoList& permission_info_list,
1164 const ChosenObjectInfoList& chosen_object_info_list) { 1165 const ChosenObjectInfoList& chosen_object_info_list) {
1165 [bubble_controller_ setPermissionInfo:permission_info_list 1166 [bubble_controller_ setPermissionInfo:permission_info_list
1166 andChosenObjects:chosen_object_info_list]; 1167 andChosenObjects:chosen_object_info_list];
1167 } 1168 }
1168 1169
1169 void WebsiteSettingsUIBridge::SetSelectedTab(TabId tab_id) { 1170 void WebsiteSettingsUIBridge::SetSelectedTab(TabId tab_id) {
1170 // TODO(lgarron): Remove this from the interface. (crbug.com/571533) 1171 // TODO(lgarron): Remove this from the interface. (crbug.com/571533)
1171 } 1172 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698