OLD | NEW |
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 "content/shell/shell.h" | 5 #include "content/shell/shell.h" |
6 | 6 |
7 #include <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 GtkWidget* CreateMenuBar(Shell* shell) { | 47 GtkWidget* CreateMenuBar(Shell* shell) { |
48 GtkWidget* menu_bar = gtk_menu_bar_new(); | 48 GtkWidget* menu_bar = gtk_menu_bar_new(); |
49 GtkWidget* debug_menu = CreateMenu(menu_bar, "Debug"); | 49 GtkWidget* debug_menu = CreateMenu(menu_bar, "Debug"); |
50 AddMenuEntry(debug_menu, "Show web inspector...", | 50 AddMenuEntry(debug_menu, "Show web inspector...", |
51 G_CALLBACK(ShowWebInspectorActivated), shell); | 51 G_CALLBACK(ShowWebInspectorActivated), shell); |
52 return menu_bar; | 52 return menu_bar; |
53 } | 53 } |
54 | 54 |
55 } // namespace | 55 } // namespace |
56 | 56 |
57 void Shell::PlatformInitialize() { | 57 void Shell::PlatformInitialize(const gfx::Size& default_window_size) { |
58 } | 58 } |
59 | 59 |
60 void Shell::PlatformCleanUp() { | 60 void Shell::PlatformCleanUp() { |
61 // Nothing to clean up; GTK will clean up the widgets shortly after. | 61 // Nothing to clean up; GTK will clean up the widgets shortly after. |
62 } | 62 } |
63 | 63 |
64 void Shell::PlatformEnableUIControl(UIControl control, bool is_enabled) { | 64 void Shell::PlatformEnableUIControl(UIControl control, bool is_enabled) { |
65 if (headless_) | 65 if (headless_) |
66 return; | 66 return; |
67 | 67 |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 | 289 |
290 void Shell::PlatformSetTitle(const string16& title) { | 290 void Shell::PlatformSetTitle(const string16& title) { |
291 if (headless_) | 291 if (headless_) |
292 return; | 292 return; |
293 | 293 |
294 std::string title_utf8 = UTF16ToUTF8(title); | 294 std::string title_utf8 = UTF16ToUTF8(title); |
295 gtk_window_set_title(GTK_WINDOW(window_), title_utf8.c_str()); | 295 gtk_window_set_title(GTK_WINDOW(window_), title_utf8.c_str()); |
296 } | 296 } |
297 | 297 |
298 } // namespace content | 298 } // namespace content |
OLD | NEW |