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

Side by Side Diff: content/shell/shell_gtk.cc

Issue 13409003: Hide ContentClient getters from embedders so that they they don't reuse content's embedder API. The… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 7 years, 8 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 "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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 GdkModifierType modifier) { 264 GdkModifierType modifier) {
265 gtk_widget_destroy(GTK_WIDGET(window_)); 265 gtk_widget_destroy(GTK_WIDGET(window_));
266 return TRUE; 266 return TRUE;
267 } 267 }
268 268
269 gboolean Shell::OnNewWindowKeyPressed(GtkAccelGroup* accel_group, 269 gboolean Shell::OnNewWindowKeyPressed(GtkAccelGroup* accel_group,
270 GObject* acceleratable, 270 GObject* acceleratable,
271 guint keyval, 271 guint keyval,
272 GdkModifierType modifier) { 272 GdkModifierType modifier) {
273 ShellBrowserContext* browser_context = 273 ShellBrowserContext* browser_context =
274 static_cast<ShellContentBrowserClient*>( 274 ShellContentBrowserClient::Get()->browser_context();
275 GetContentClient()->browser())->browser_context();
276 Shell::CreateNewWindow(browser_context, 275 Shell::CreateNewWindow(browser_context,
277 GURL(), 276 GURL(),
278 NULL, 277 NULL,
279 MSG_ROUTING_NONE, 278 MSG_ROUTING_NONE,
280 gfx::Size()); 279 gfx::Size());
281 return TRUE; 280 return TRUE;
282 } 281 }
283 282
284 gboolean Shell::OnHighlightURLView(GtkAccelGroup* accel_group, 283 gboolean Shell::OnHighlightURLView(GtkAccelGroup* accel_group,
285 GObject* acceleratable, 284 GObject* acceleratable,
286 guint keyval, 285 guint keyval,
287 GdkModifierType modifier) { 286 GdkModifierType modifier) {
288 gtk_widget_grab_focus(GTK_WIDGET(url_edit_view_)); 287 gtk_widget_grab_focus(GTK_WIDGET(url_edit_view_));
289 return TRUE; 288 return TRUE;
290 } 289 }
291 290
292 void Shell::PlatformSetTitle(const string16& title) { 291 void Shell::PlatformSetTitle(const string16& title) {
293 if (headless_) 292 if (headless_)
294 return; 293 return;
295 294
296 std::string title_utf8 = UTF16ToUTF8(title); 295 std::string title_utf8 = UTF16ToUTF8(title);
297 gtk_window_set_title(GTK_WINDOW(window_), title_utf8.c_str()); 296 gtk_window_set_title(GTK_WINDOW(window_), title_utf8.c_str());
298 } 297 }
299 298
300 } // namespace content 299 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/shell_devtools_frontend.cc ('k') | content/shell/shell_render_process_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698