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

Side by Side Diff: chrome/browser/ui/gtk/gtk_util.cc

Issue 10702029: Move tab functions off Browser into browser_tabstrip and browser_tabrestore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/gtk/gtk_util.h" 5 #include "chrome/browser/ui/gtk/gtk_util.h"
6 6
7 #include <cairo/cairo.h> 7 #include <cairo/cairo.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cstdarg> 10 #include <cstdarg>
11 #include <map> 11 #include <map>
12 12
13 #include "base/environment.h" 13 #include "base/environment.h"
14 #include "base/i18n/rtl.h" 14 #include "base/i18n/rtl.h"
15 #include "base/logging.h" 15 #include "base/logging.h"
16 #include "base/nix/xdg_util.h" 16 #include "base/nix/xdg_util.h"
17 #include "base/string_number_conversions.h" 17 #include "base/string_number_conversions.h"
18 #include "base/utf_string_conversions.h" 18 #include "base/utf_string_conversions.h"
19 #include "chrome/browser/autocomplete/autocomplete.h" 19 #include "chrome/browser/autocomplete/autocomplete.h"
20 #include "chrome/browser/autocomplete/autocomplete_classifier.h" 20 #include "chrome/browser/autocomplete/autocomplete_classifier.h"
21 #include "chrome/browser/autocomplete/autocomplete_classifier_factory.h" 21 #include "chrome/browser/autocomplete/autocomplete_classifier_factory.h"
22 #include "chrome/browser/autocomplete/autocomplete_match.h" 22 #include "chrome/browser/autocomplete/autocomplete_match.h"
23 #include "chrome/browser/browser_process.h" 23 #include "chrome/browser/browser_process.h"
24 #include "chrome/browser/profiles/profile.h" 24 #include "chrome/browser/profiles/profile.h"
25 #include "chrome/browser/profiles/profile_info_cache.h" 25 #include "chrome/browser/profiles/profile_info_cache.h"
26 #include "chrome/browser/profiles/profile_manager.h" 26 #include "chrome/browser/profiles/profile_manager.h"
27 #include "chrome/browser/ui/browser.h" 27 #include "chrome/browser/ui/browser.h"
28 #include "chrome/browser/ui/browser_list.h" 28 #include "chrome/browser/ui/browser_list.h"
29 #include "chrome/browser/ui/browser_tabstrip.h"
29 #include "chrome/browser/ui/browser_window.h" 30 #include "chrome/browser/ui/browser_window.h"
30 #include "chrome/browser/ui/gtk/browser_window_gtk.h" 31 #include "chrome/browser/ui/gtk/browser_window_gtk.h"
31 #include "chrome/browser/ui/gtk/gtk_theme_service.h" 32 #include "chrome/browser/ui/gtk/gtk_theme_service.h"
32 #include "content/public/browser/render_view_host.h" 33 #include "content/public/browser/render_view_host.h"
33 #include "content/public/browser/web_contents.h" 34 #include "content/public/browser/web_contents.h"
34 #include "googleurl/src/gurl.h" 35 #include "googleurl/src/gurl.h"
35 #include "grit/theme_resources.h" 36 #include "grit/theme_resources.h"
36 #include "grit/theme_resources_standard.h" 37 #include "grit/theme_resources_standard.h"
37 #include "ui/base/gtk/gtk_compat.h" 38 #include "ui/base/gtk/gtk_compat.h"
38 #include "ui/base/gtk/gtk_hig_constants.h" 39 #include "ui/base/gtk/gtk_hig_constants.h"
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 event); 276 event);
276 } 277 }
277 g_list_free(children); 278 g_list_free(children);
278 279
279 return TRUE; 280 return TRUE;
280 } 281 }
281 282
282 WebContents* GetBrowserWindowSelectedWebContents(BrowserWindow* window) { 283 WebContents* GetBrowserWindowSelectedWebContents(BrowserWindow* window) {
283 BrowserWindowGtk* browser_window = static_cast<BrowserWindowGtk*>( 284 BrowserWindowGtk* browser_window = static_cast<BrowserWindowGtk*>(
284 window); 285 window);
285 return browser_window->browser()->GetActiveWebContents(); 286 return chrome::GetActiveWebContents(browser_window->browser());
286 } 287 }
287 288
288 GtkWidget* GetBrowserWindowFocusedWidget(BrowserWindow* window) { 289 GtkWidget* GetBrowserWindowFocusedWidget(BrowserWindow* window) {
289 return gtk_window_get_focus(window->GetNativeWindow()); 290 return gtk_window_get_focus(window->GetNativeWindow());
290 } 291 }
291 292
292 } // namespace 293 } // namespace
293 294
294 namespace gtk_util { 295 namespace gtk_util {
295 296
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
1037 1038
1038 void DoCopy(BrowserWindow* window) { 1039 void DoCopy(BrowserWindow* window) {
1039 DoCutCopyPaste(window, &RenderWidgetHost::Copy, "copy-clipboard"); 1040 DoCutCopyPaste(window, &RenderWidgetHost::Copy, "copy-clipboard");
1040 } 1041 }
1041 1042
1042 void DoPaste(BrowserWindow* window) { 1043 void DoPaste(BrowserWindow* window) {
1043 DoCutCopyPaste(window, &RenderWidgetHost::Paste, "paste-clipboard"); 1044 DoCutCopyPaste(window, &RenderWidgetHost::Paste, "paste-clipboard");
1044 } 1045 }
1045 1046
1046 } // namespace gtk_util 1047 } // namespace gtk_util
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/browser_window_gtk.cc ('k') | chrome/browser/ui/gtk/location_bar_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698