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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 GObject* acceleratable, | 268 GObject* acceleratable, |
269 guint keyval, | 269 guint keyval, |
270 GdkModifierType modifier) { | 270 GdkModifierType modifier) { |
271 ShellBrowserContext* browser_context = | 271 ShellBrowserContext* browser_context = |
272 static_cast<ShellContentBrowserClient*>( | 272 static_cast<ShellContentBrowserClient*>( |
273 GetContentClient()->browser())->browser_context(); | 273 GetContentClient()->browser())->browser_context(); |
274 Shell::CreateNewWindow(browser_context, | 274 Shell::CreateNewWindow(browser_context, |
275 GURL(), | 275 GURL(), |
276 NULL, | 276 NULL, |
277 MSG_ROUTING_NONE, | 277 MSG_ROUTING_NONE, |
278 NULL); | 278 gfx::Size()); |
279 return TRUE; | 279 return TRUE; |
280 } | 280 } |
281 | 281 |
282 gboolean Shell::OnHighlightURLView(GtkAccelGroup* accel_group, | 282 gboolean Shell::OnHighlightURLView(GtkAccelGroup* accel_group, |
283 GObject* acceleratable, | 283 GObject* acceleratable, |
284 guint keyval, | 284 guint keyval, |
285 GdkModifierType modifier) { | 285 GdkModifierType modifier) { |
286 gtk_widget_grab_focus(GTK_WIDGET(url_edit_view_)); | 286 gtk_widget_grab_focus(GTK_WIDGET(url_edit_view_)); |
287 return TRUE; | 287 return TRUE; |
288 } | 288 } |
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 |