| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "webkit/default_plugin/plugin_impl_mac.h" | 5 #include "chrome/default_plugin/plugin_impl_mac.h" |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 | 8 |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| 11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
| 12 #include "chrome/default_plugin/plugin_main.h" |
| 12 #include "googleurl/src/gurl.h" | 13 #include "googleurl/src/gurl.h" |
| 13 #include "grit/webkit_strings.h" | 14 #include "grit/webkit_strings.h" |
| 14 #include "unicode/locid.h" | 15 #include "unicode/locid.h" |
| 15 #include "webkit/default_plugin/default_plugin_shared.h" | |
| 16 #include "webkit/default_plugin/plugin_main.h" | |
| 17 #include "webkit/glue/webkit_glue.h" | 16 #include "webkit/glue/webkit_glue.h" |
| 17 #include "webkit/glue/plugins/default_plugin_shared.h" |
| 18 | 18 |
| 19 // TODO(thakis): Most methods in this class are stubbed out and need to be | 19 // TODO(thakis): Most methods in this class are stubbed out and need to be |
| 20 // implemented. | 20 // implemented. |
| 21 | 21 |
| 22 PluginInstallerImpl::PluginInstallerImpl(int16 mode) { | 22 PluginInstallerImpl::PluginInstallerImpl(int16 mode) { |
| 23 } | 23 } |
| 24 | 24 |
| 25 PluginInstallerImpl::~PluginInstallerImpl() { | 25 PluginInstallerImpl::~PluginInstallerImpl() { |
| 26 } | 26 } |
| 27 | 27 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 154 |
| 155 [[NSColor colorWithCalibratedWhite:0.52 alpha:1.0] setFill]; | 155 [[NSColor colorWithCalibratedWhite:0.52 alpha:1.0] setFill]; |
| 156 [[NSBezierPath bezierPathWithRoundedRect:text_rect | 156 [[NSBezierPath bezierPathWithRoundedRect:text_rect |
| 157 xRadius:NSHeight(text_rect)/2 | 157 xRadius:NSHeight(text_rect)/2 |
| 158 yRadius:NSHeight(text_rect)/2] fill]; | 158 yRadius:NSHeight(text_rect)/2] fill]; |
| 159 | 159 |
| 160 NSPoint label_point = NSMakePoint( | 160 NSPoint label_point = NSMakePoint( |
| 161 roundf(text_rect.origin.x + (text_rect.size.width - text_size.width)/2), | 161 roundf(text_rect.origin.x + (text_rect.size.width - text_size.width)/2), |
| 162 roundf(text_rect.origin.y + (text_rect.size.height - text_size.height)/2))
; | 162 roundf(text_rect.origin.y + (text_rect.size.height - text_size.height)/2))
; |
| 163 [text drawAtPoint:label_point withAttributes:attributes]; | 163 [text drawAtPoint:label_point withAttributes:attributes]; |
| 164 | 164 |
| 165 [NSGraphicsContext restoreGraphicsState]; | 165 [NSGraphicsContext restoreGraphicsState]; |
| 166 return 1; | 166 return 1; |
| 167 } | 167 } |
| 168 | 168 |
| 169 | 169 |
| 170 void PluginInstallerImpl::ShowInstallDialog() { | 170 void PluginInstallerImpl::ShowInstallDialog() { |
| 171 } | 171 } |
| 172 | 172 |
| 173 void PluginInstallerImpl::NotifyPluginStatus(int status) { | 173 void PluginInstallerImpl::NotifyPluginStatus(int status) { |
| 174 default_plugin::g_browser->getvalue( | 174 default_plugin::g_browser->getvalue( |
| 175 instance_, | 175 instance_, |
| 176 static_cast<NPNVariable>( | 176 static_cast<NPNVariable>( |
| 177 default_plugin::kMissingPluginStatusStart + status), | 177 default_plugin::kMissingPluginStatusStart + status), |
| 178 NULL); | 178 NULL); |
| 179 } | 179 } |
| OLD | NEW |