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

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

Issue 98073015: <webview>: Support zoom in WebUI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix GTK Created 6 years, 11 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
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/zoom_bubble_gtk.h" 5 #include "chrome/browser/ui/gtk/zoom_bubble_gtk.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 212
213 void ZoomBubbleGtk::OnDestroy(GtkWidget* widget) { 213 void ZoomBubbleGtk::OnDestroy(GtkWidget* widget) {
214 // Listen to the destroy signal and delete this instance when it is caught. 214 // Listen to the destroy signal and delete this instance when it is caught.
215 delete this; 215 delete this;
216 } 216 }
217 217
218 void ZoomBubbleGtk::OnSetDefaultLinkClick(GtkWidget* widget) { 218 void ZoomBubbleGtk::OnSetDefaultLinkClick(GtkWidget* widget) {
219 double default_zoom_level = Profile::FromBrowserContext( 219 double default_zoom_level = Profile::FromBrowserContext(
220 web_contents_->GetBrowserContext())->GetPrefs()->GetDouble( 220 web_contents_->GetBrowserContext())->GetPrefs()->GetDouble(
221 prefs::kDefaultZoomLevel); 221 prefs::kDefaultZoomLevel);
222 web_contents_->GetRenderViewHost()->SetZoomLevel(default_zoom_level); 222 web_contents_->SetZoomLevel(default_zoom_level);
223 } 223 }
224 224
225 gboolean ZoomBubbleGtk::OnMouseEnter(GtkWidget* widget, 225 gboolean ZoomBubbleGtk::OnMouseEnter(GtkWidget* widget,
226 GdkEventCrossing* event) { 226 GdkEventCrossing* event) {
227 mouse_inside_ = true; 227 mouse_inside_ = true;
228 StopTimerIfNecessary(); 228 StopTimerIfNecessary();
229 return FALSE; 229 return FALSE;
230 } 230 }
231 231
232 gboolean ZoomBubbleGtk::OnMouseLeave(GtkWidget* widget, 232 gboolean ZoomBubbleGtk::OnMouseLeave(GtkWidget* widget,
233 GdkEventCrossing* event) { 233 GdkEventCrossing* event) {
234 mouse_inside_ = false; 234 mouse_inside_ = false;
235 StartTimerIfNecessary(); 235 StartTimerIfNecessary();
236 return FALSE; 236 return FALSE;
237 } 237 }
238 238
239 void ZoomBubbleGtk::Observe(int type, 239 void ZoomBubbleGtk::Observe(int type,
240 const content::NotificationSource& source, 240 const content::NotificationSource& source,
241 const content::NotificationDetails& details) { 241 const content::NotificationDetails& details) {
242 DCHECK_EQ(type, chrome::NOTIFICATION_FULLSCREEN_CHANGED); 242 DCHECK_EQ(type, chrome::NOTIFICATION_FULLSCREEN_CHANGED);
243 CloseBubble(); 243 CloseBubble();
244 } 244 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_page_zoom.cc ('k') | content/browser/browser_plugin/browser_plugin_embedder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698