| 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 "chrome/browser/automation/automation_provider.h" | 5 #include "chrome/browser/automation/automation_provider.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
| 11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
| 12 #include "chrome/browser/automation/automation_browser_tracker.h" | 12 #include "chrome/browser/automation/automation_browser_tracker.h" |
| 13 #include "chrome/browser/automation/automation_tab_tracker.h" | 13 #include "chrome/browser/automation/automation_tab_tracker.h" |
| 14 #include "chrome/browser/automation/automation_window_tracker.h" | 14 #include "chrome/browser/automation/automation_window_tracker.h" |
| 15 #include "chrome/browser/external_tab_container_win.h" | 15 #include "chrome/browser/external_tab/external_tab_container_win.h" |
| 16 #include "chrome/browser/printing/print_view_manager.h" | 16 #include "chrome/browser/printing/print_view_manager.h" |
| 17 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
| 18 #include "chrome/browser/sessions/restore_tab_helper.h" | 18 #include "chrome/browser/sessions/restore_tab_helper.h" |
| 19 #include "chrome/browser/ui/browser.h" | 19 #include "chrome/browser/ui/browser.h" |
| 20 #include "chrome/browser/ui/browser_window.h" | 20 #include "chrome/browser/ui/browser_window.h" |
| 21 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 21 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 22 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" | 22 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" |
| 23 #include "chrome/common/automation_messages.h" | 23 #include "chrome/common/automation_messages.h" |
| 24 #include "chrome/common/render_messages.h" | 24 #include "chrome/common/render_messages.h" |
| 25 #include "content/public/browser/navigation_controller.h" | 25 #include "content/public/browser/navigation_controller.h" |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 void AutomationProvider::OnSetZoomLevel(int handle, int zoom_level) { | 403 void AutomationProvider::OnSetZoomLevel(int handle, int zoom_level) { |
| 404 if (tab_tracker_->ContainsHandle(handle)) { | 404 if (tab_tracker_->ContainsHandle(handle)) { |
| 405 NavigationController* tab = tab_tracker_->GetResource(handle); | 405 NavigationController* tab = tab_tracker_->GetResource(handle); |
| 406 if (tab->GetWebContents() && tab->GetWebContents()->GetRenderViewHost()) { | 406 if (tab->GetWebContents() && tab->GetWebContents()->GetRenderViewHost()) { |
| 407 RenderViewHost* host = tab->GetWebContents()->GetRenderViewHost(); | 407 RenderViewHost* host = tab->GetWebContents()->GetRenderViewHost(); |
| 408 content::PageZoom zoom = static_cast<content::PageZoom>(zoom_level); | 408 content::PageZoom zoom = static_cast<content::PageZoom>(zoom_level); |
| 409 host->Zoom(zoom); | 409 host->Zoom(zoom); |
| 410 } | 410 } |
| 411 } | 411 } |
| 412 } | 412 } |
| OLD | NEW |