OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/browser/renderer_host/render_view_host.h" | 5 #include "content/browser/renderer_host/render_view_host.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 // Delay to wait on closing the tab for a beforeunload/unload handler to fire. | 62 // Delay to wait on closing the tab for a beforeunload/unload handler to fire. |
63 const int kUnloadTimeoutMS = 1000; | 63 const int kUnloadTimeoutMS = 1000; |
64 | 64 |
65 // Translate a WebKit text direction into a base::i18n one. | 65 // Translate a WebKit text direction into a base::i18n one. |
66 base::i18n::TextDirection WebTextDirectionToChromeTextDirection( | 66 base::i18n::TextDirection WebTextDirectionToChromeTextDirection( |
67 WebKit::WebTextDirection dir) { | 67 WebKit::WebTextDirection dir) { |
68 switch (dir) { | 68 switch (dir) { |
69 case WebKit::WebTextDirectionLeftToRight: | 69 case WebKit::WebTextDirectionLeftToRight: |
70 return base::i18n::LEFT_TO_RIGHT; | 70 return base::i18n::LEFT_TO_RIGHT; |
71 case WebKit::WebTextDirectionRightToLeft: | 71 case WebKit::WebTextDirectionRightToLeft: |
72 return base::i18n::LEFT_TO_RIGHT; | 72 return base::i18n::RIGHT_TO_LEFT; |
73 default: | 73 default: |
74 NOTREACHED(); | 74 NOTREACHED(); |
75 return base::i18n::UNKNOWN_DIRECTION; | 75 return base::i18n::UNKNOWN_DIRECTION; |
76 } | 76 } |
77 } | 77 } |
78 | 78 |
79 } // namespace | 79 } // namespace |
80 | 80 |
81 /////////////////////////////////////////////////////////////////////////////// | 81 /////////////////////////////////////////////////////////////////////////////// |
82 // RenderViewHost, public: | 82 // RenderViewHost, public: |
(...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1332 if (view) { | 1332 if (view) { |
1333 view->ShowPopupMenu(params.bounds, | 1333 view->ShowPopupMenu(params.bounds, |
1334 params.item_height, | 1334 params.item_height, |
1335 params.item_font_size, | 1335 params.item_font_size, |
1336 params.selected_item, | 1336 params.selected_item, |
1337 params.popup_items, | 1337 params.popup_items, |
1338 params.right_aligned); | 1338 params.right_aligned); |
1339 } | 1339 } |
1340 } | 1340 } |
1341 #endif | 1341 #endif |
OLD | NEW |