OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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_win.h" | 5 #include "webkit/default_plugin/plugin_impl_win.h" |
6 | 6 |
7 #include <shellapi.h> | 7 #include <shellapi.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" |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 HBRUSH brush = ::CreateSolidBrush(RGB(252, 235, 162)); | 392 HBRUSH brush = ::CreateSolidBrush(RGB(252, 235, 162)); |
393 DCHECK(brush); | 393 DCHECK(brush); |
394 ::FillRect(paint_device_context, &erase_rect, brush); | 394 ::FillRect(paint_device_context, &erase_rect, brush); |
395 ::DeleteObject(brush); | 395 ::DeleteObject(brush); |
396 return 1; | 396 return 1; |
397 } | 397 } |
398 | 398 |
399 // Use ICU in order to determine whether the locale is right-to-left. | 399 // Use ICU in order to determine whether the locale is right-to-left. |
400 // | 400 // |
401 // TODO(idana) bug# 1246452: there is already code in | 401 // TODO(idana) bug# 1246452: there is already code in |
402 // chrome/common/l10n_util.h/cc that uses ICU to determine the locale | 402 // app/l10n_util.h/cc that uses ICU to determine the locale direction. We don't |
403 // direction. We don't currently use this code since code in WebKit should not | 403 // currently use this code since code in WebKit should not depend on code in |
404 // depend on code in Chrome. We can fix this by pulling (at least part of) the | 404 // Chrome. We can fix this by pulling (at least part of) the l10n_util |
405 // l10n_util functionality up into the Base module. | 405 // functionality up into the Base module. |
406 bool PluginInstallerImpl::IsRTLLayout() const { | 406 bool PluginInstallerImpl::IsRTLLayout() const { |
407 const Locale& locale = Locale::getDefault(); | 407 const Locale& locale = Locale::getDefault(); |
408 const char* lang = locale.getLanguage(); | 408 const char* lang = locale.getLanguage(); |
409 | 409 |
410 // Check only for Arabic and Hebrew languages for now. | 410 // Check only for Arabic and Hebrew languages for now. |
411 if (strcmp(lang, "ar") == 0 || strcmp(lang, "he") == 0) { | 411 if (strcmp(lang, "ar") == 0 || strcmp(lang, "he") == 0) { |
412 return true; | 412 return true; |
413 } | 413 } |
414 return false; | 414 return false; |
415 } | 415 } |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
775 return true; | 775 return true; |
776 } | 776 } |
777 | 777 |
778 void PluginInstallerImpl::NotifyPluginStatus(int status) { | 778 void PluginInstallerImpl::NotifyPluginStatus(int status) { |
779 default_plugin::g_browser->getvalue( | 779 default_plugin::g_browser->getvalue( |
780 instance_, | 780 instance_, |
781 static_cast<NPNVariable>( | 781 static_cast<NPNVariable>( |
782 default_plugin::kMissingPluginStatusStart + status), | 782 default_plugin::kMissingPluginStatusStart + status), |
783 NULL); | 783 NULL); |
784 } | 784 } |
OLD | NEW |