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

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

Issue 63273002: Rename WebKit namespace to blink (part 4) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « chrome/browser/ui/gtk/panels/panel_gtk.cc ('k') | chrome/browser/ui/pdf/pdf_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/web_dialog_gtk.h" 5 #include "chrome/browser/ui/gtk/web_dialog_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/ui/browser_dialogs.h" 10 #include "chrome/browser/ui/browser_dialogs.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 186
187 //////////////////////////////////////////////////////////////////////////////// 187 ////////////////////////////////////////////////////////////////////////////////
188 // content::WebContentsDelegate implementation: 188 // content::WebContentsDelegate implementation:
189 189
190 // A simplified version of BrowserWindowGtk::HandleKeyboardEvent(). 190 // A simplified version of BrowserWindowGtk::HandleKeyboardEvent().
191 // We don't handle global keyboard shortcuts here, but that's fine since 191 // We don't handle global keyboard shortcuts here, but that's fine since
192 // they're all browser-specific. (This may change in the future.) 192 // they're all browser-specific. (This may change in the future.)
193 void WebDialogGtk::HandleKeyboardEvent(content::WebContents* source, 193 void WebDialogGtk::HandleKeyboardEvent(content::WebContents* source,
194 const NativeWebKeyboardEvent& event) { 194 const NativeWebKeyboardEvent& event) {
195 GdkEventKey* os_event = &event.os_event->key; 195 GdkEventKey* os_event = &event.os_event->key;
196 if (!os_event || event.type == WebKit::WebInputEvent::Char) 196 if (!os_event || event.type == blink::WebInputEvent::Char)
197 return; 197 return;
198 198
199 // To make sure the default key bindings can still work, such as Escape to 199 // To make sure the default key bindings can still work, such as Escape to
200 // close the dialog. 200 // close the dialog.
201 gtk_bindings_activate_event(GTK_OBJECT(dialog_), os_event); 201 gtk_bindings_activate_event(GTK_OBJECT(dialog_), os_event);
202 } 202 }
203 203
204 //////////////////////////////////////////////////////////////////////////////// 204 ////////////////////////////////////////////////////////////////////////////////
205 // WebDialogGtk: 205 // WebDialogGtk:
206 206
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 gtk_widget_show_all(dialog_); 255 gtk_widget_show_all(dialog_);
256 256
257 web_contents_->GetView()->SetInitialFocus(); 257 web_contents_->GetView()->SetInitialFocus();
258 258
259 return GTK_WINDOW(dialog_); 259 return GTK_WINDOW(dialog_);
260 } 260 }
261 261
262 void WebDialogGtk::OnResponse(GtkWidget* dialog, int response_id) { 262 void WebDialogGtk::OnResponse(GtkWidget* dialog, int response_id) {
263 OnDialogClosed(std::string()); 263 OnDialogClosed(std::string());
264 } 264 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/panels/panel_gtk.cc ('k') | chrome/browser/ui/pdf/pdf_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698