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

Side by Side Diff: chrome/browser/gtk/bookmark_bubble_gtk.cc

Issue 1073005: Move RTL related functions from app/l10n_util to base/i18n/rtl... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/find_bar_controller.cc ('k') | chrome/browser/gtk/browser_toolbar_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "chrome/browser/gtk/bookmark_bubble_gtk.h" 5 #include "chrome/browser/gtk/bookmark_bubble_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/i18n/rtl.h"
12 #include "base/logging.h" 13 #include "base/logging.h"
13 #include "base/message_loop.h" 14 #include "base/message_loop.h"
14 #include "chrome/browser/bookmarks/bookmark_editor.h" 15 #include "chrome/browser/bookmarks/bookmark_editor.h"
15 #include "chrome/browser/bookmarks/bookmark_model.h" 16 #include "chrome/browser/bookmarks/bookmark_model.h"
16 #include "chrome/browser/bookmarks/bookmark_utils.h" 17 #include "chrome/browser/bookmarks/bookmark_utils.h"
17 #include "chrome/browser/gtk/gtk_chrome_link_button.h" 18 #include "chrome/browser/gtk/gtk_chrome_link_button.h"
18 #include "chrome/browser/gtk/gtk_theme_provider.h" 19 #include "chrome/browser/gtk/gtk_theme_provider.h"
19 #include "chrome/browser/gtk/gtk_util.h" 20 #include "chrome/browser/gtk/gtk_util.h"
20 #include "chrome/browser/gtk/info_bubble_gtk.h" 21 #include "chrome/browser/gtk/info_bubble_gtk.h"
21 #include "chrome/browser/metrics/user_metrics.h" 22 #include "chrome/browser/metrics/user_metrics.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 gtk_box_pack_start(GTK_BOX(bottom), close_button, 215 gtk_box_pack_start(GTK_BOX(bottom), close_button,
215 FALSE, FALSE, 0); 216 FALSE, FALSE, 0);
216 217
217 gtk_box_pack_start(GTK_BOX(content), top, TRUE, TRUE, 0); 218 gtk_box_pack_start(GTK_BOX(content), top, TRUE, TRUE, 0);
218 gtk_box_pack_start(GTK_BOX(content), table, TRUE, TRUE, 0); 219 gtk_box_pack_start(GTK_BOX(content), table, TRUE, TRUE, 0);
219 gtk_box_pack_start(GTK_BOX(content), bottom, TRUE, TRUE, 0); 220 gtk_box_pack_start(GTK_BOX(content), bottom, TRUE, TRUE, 0);
220 // We want the focus to start on the entry, not on the remove button. 221 // We want the focus to start on the entry, not on the remove button.
221 gtk_container_set_focus_child(GTK_CONTAINER(content), table); 222 gtk_container_set_focus_child(GTK_CONTAINER(content), table);
222 223
223 InfoBubbleGtk::ArrowLocationGtk arrow_location = 224 InfoBubbleGtk::ArrowLocationGtk arrow_location =
224 (l10n_util::GetTextDirection() == l10n_util::LEFT_TO_RIGHT) ? 225 !base::i18n::IsRTL() ?
225 InfoBubbleGtk::ARROW_LOCATION_TOP_LEFT : 226 InfoBubbleGtk::ARROW_LOCATION_TOP_LEFT :
226 InfoBubbleGtk::ARROW_LOCATION_TOP_RIGHT; 227 InfoBubbleGtk::ARROW_LOCATION_TOP_RIGHT;
227 bubble_ = InfoBubbleGtk::Show(toplevel_window_, 228 bubble_ = InfoBubbleGtk::Show(toplevel_window_,
228 rect, 229 rect,
229 content, 230 content,
230 arrow_location, 231 arrow_location,
231 true, 232 true,
232 theme_provider_, 233 theme_provider_,
233 this); // delegate 234 this); // delegate
234 if (!bubble_) { 235 if (!bubble_) {
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 382
382 // Close the bubble, deleting the C++ objects, etc. 383 // Close the bubble, deleting the C++ objects, etc.
383 bubble_->Close(); 384 bubble_->Close();
384 385
385 if (node) { 386 if (node) {
386 BookmarkEditor::Show(toplevel, profile, NULL, 387 BookmarkEditor::Show(toplevel, profile, NULL,
387 BookmarkEditor::EditDetails(node), 388 BookmarkEditor::EditDetails(node),
388 BookmarkEditor::SHOW_TREE, NULL); 389 BookmarkEditor::SHOW_TREE, NULL);
389 } 390 }
390 } 391 }
OLDNEW
« no previous file with comments | « chrome/browser/find_bar_controller.cc ('k') | chrome/browser/gtk/browser_toolbar_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698