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/browser/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" |
11 #include "base/strings/string_piece.h" | 11 #include "base/strings/string_piece.h" |
12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
13 #include "content/public/browser/browser_context.h" | 13 #include "content/public/browser/browser_context.h" |
14 #include "content/public/browser/native_web_keyboard_event.h" | 14 #include "content/public/browser/native_web_keyboard_event.h" |
15 #include "content/public/browser/web_contents.h" | 15 #include "content/public/browser/web_contents.h" |
16 #include "content/public/browser/web_contents_view.h" | 16 #include "content/public/browser/web_contents_view.h" |
17 #include "content/public/common/renderer_preferences.h" | 17 #include "content/public/common/renderer_preferences.h" |
18 #include "content/shell/shell_browser_context.h" | 18 #include "content/shell/browser/shell_browser_context.h" |
19 #include "content/shell/shell_content_browser_client.h" | 19 #include "content/shell/browser/shell_content_browser_client.h" |
20 | 20 |
21 namespace content { | 21 namespace content { |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 // Callback for Debug > Show web inspector... menu item. | 25 // Callback for Debug > Show web inspector... menu item. |
26 gboolean ShowWebInspectorActivated(GtkWidget* widget, Shell* shell) { | 26 gboolean ShowWebInspectorActivated(GtkWidget* widget, Shell* shell) { |
27 shell->ShowDevTools(); | 27 shell->ShowDevTools(); |
28 return FALSE; // Don't stop this message. | 28 return FALSE; // Don't stop this message. |
29 } | 29 } |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 | 330 |
331 void Shell::PlatformSetTitle(const string16& title) { | 331 void Shell::PlatformSetTitle(const string16& title) { |
332 if (headless_) | 332 if (headless_) |
333 return; | 333 return; |
334 | 334 |
335 std::string title_utf8 = UTF16ToUTF8(title); | 335 std::string title_utf8 = UTF16ToUTF8(title); |
336 gtk_window_set_title(GTK_WINDOW(window_), title_utf8.c_str()); | 336 gtk_window_set_title(GTK_WINDOW(window_), title_utf8.c_str()); |
337 } | 337 } |
338 | 338 |
339 } // namespace content | 339 } // namespace content |
OLD | NEW |