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

Side by Side Diff: components/ui/zoom/zoom_controller.cc

Issue 1414643005: Disable zoom bubble for PDF extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test rebuilding patch from .diff file. Created 5 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
« no previous file with comments | « components/ui/zoom/zoom_controller.h ('k') | components/ui_zoom.gypi » ('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 "components/ui/zoom/zoom_controller.h" 5 #include "components/ui/zoom/zoom_controller.h"
6 6
7 #include "components/ui/zoom/zoom_event_manager.h" 7 #include "components/ui/zoom/zoom_event_manager.h"
8 #include "components/ui/zoom/zoom_observer.h" 8 #include "components/ui/zoom/zoom_observer.h"
9 #include "content/public/browser/host_zoom_map.h" 9 #include "content/public/browser/host_zoom_map.h"
10 #include "content/public/browser/navigation_details.h" 10 #include "content/public/browser/navigation_details.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 double old_zoom_level = zoom_level_; 114 double old_zoom_level = zoom_level_;
115 zoom_level_ = zoom_level; 115 zoom_level_ = zoom_level;
116 116
117 // TODO(wjmaclean) Do we care about filling in host/scheme here? 117 // TODO(wjmaclean) Do we care about filling in host/scheme here?
118 content::HostZoomMap::ZoomLevelChange change; 118 content::HostZoomMap::ZoomLevelChange change;
119 change.mode = content::HostZoomMap::ZOOM_CHANGED_TEMPORARY_ZOOM; 119 change.mode = content::HostZoomMap::ZOOM_CHANGED_TEMPORARY_ZOOM;
120 change.zoom_level = zoom_level; 120 change.zoom_level = zoom_level;
121 ZoomEventManager::GetForBrowserContext(browser_context_) 121 ZoomEventManager::GetForBrowserContext(browser_context_)
122 ->OnZoomLevelChanged(change); 122 ->OnZoomLevelChanged(change);
123 123
124 bool can_show_bubble = can_show_bubble_;
125 if (client && client->ShouldSuppressBubble())
126 can_show_bubble = false;
127
124 ZoomChangedEventData zoom_change_data(web_contents(), old_zoom_level, 128 ZoomChangedEventData zoom_change_data(web_contents(), old_zoom_level,
125 zoom_level_, zoom_mode_, 129 zoom_level_, zoom_mode_,
126 can_show_bubble_); 130 can_show_bubble);
127 FOR_EACH_OBSERVER(ZoomObserver, observers_, 131 FOR_EACH_OBSERVER(ZoomObserver, observers_,
128 OnZoomChanged(zoom_change_data)); 132 OnZoomChanged(zoom_change_data));
129 133
130 last_client_ = NULL; 134 last_client_ = NULL;
131 return true; 135 return true;
132 } 136 }
133 137
134 content::HostZoomMap* zoom_map = 138 content::HostZoomMap* zoom_map =
135 content::HostZoomMap::GetForWebContents(web_contents()); 139 content::HostZoomMap::GetForWebContents(web_contents());
136 DCHECK(zoom_map); 140 DCHECK(zoom_map);
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 int render_view_id = web_contents()->GetRenderViewHost()->GetRoutingID(); 367 int render_view_id = web_contents()->GetRenderViewHost()->GetRoutingID();
364 host_zoom_map_->SetPageScaleFactorIsOneForView( 368 host_zoom_map_->SetPageScaleFactorIsOneForView(
365 render_process_id, render_view_id, is_one); 369 render_process_id, render_view_id, is_one);
366 } 370 }
367 371
368 bool ZoomController::PageScaleFactorIsOne() const { 372 bool ZoomController::PageScaleFactorIsOne() const {
369 return content::HostZoomMap::PageScaleFactorIsOne(web_contents()); 373 return content::HostZoomMap::PageScaleFactorIsOne(web_contents());
370 } 374 }
371 375
372 } // namespace ui_zoom 376 } // namespace ui_zoom
OLDNEW
« no previous file with comments | « components/ui/zoom/zoom_controller.h ('k') | components/ui_zoom.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698