OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/automation/automation_browser_tracker.h" | 10 #include "chrome/browser/automation/automation_browser_tracker.h" |
11 #include "chrome/browser/automation/automation_extension_function.h" | 11 #include "chrome/browser/automation/automation_extension_function.h" |
12 #include "chrome/browser/automation/automation_tab_tracker.h" | 12 #include "chrome/browser/automation/automation_tab_tracker.h" |
13 #include "chrome/browser/automation/automation_window_tracker.h" | 13 #include "chrome/browser/automation/automation_window_tracker.h" |
14 #include "chrome/browser/automation/extension_automation_constants.h" | 14 #include "chrome/browser/automation/extension_automation_constants.h" |
15 #include "chrome/browser/automation/extension_port_container.h" | 15 #include "chrome/browser/automation/extension_port_container.h" |
16 #include "chrome/browser/automation/ui_controls.h" | 16 #include "chrome/browser/automation/ui_controls.h" |
17 #include "chrome/browser/browser_window.h" | 17 #include "chrome/browser/browser_window.h" |
18 #include "chrome/browser/extensions/extension_event_router.h" | 18 #include "chrome/browser/extensions/extension_event_router.h" |
19 #include "chrome/browser/external_tab_container_win.h" | 19 #include "chrome/browser/external_tab_container_win.h" |
20 #include "chrome/browser/profiles/profile.h" | 20 #include "chrome/browser/profiles/profile.h" |
21 #include "chrome/browser/ui/browser.h" | 21 #include "chrome/browser/ui/browser.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/page_zoom.h" | |
25 #include "content/browser/renderer_host/render_view_host.h" | 24 #include "content/browser/renderer_host/render_view_host.h" |
26 #include "content/browser/tab_contents/tab_contents.h" | 25 #include "content/browser/tab_contents/tab_contents.h" |
| 26 #include "content/common/page_zoom.h" |
27 #include "ui/base/keycodes/keyboard_codes.h" | 27 #include "ui/base/keycodes/keyboard_codes.h" |
28 #include "views/focus/accelerator_handler.h" | 28 #include "views/focus/accelerator_handler.h" |
29 #include "views/widget/root_view.h" | 29 #include "views/widget/root_view.h" |
30 #include "views/widget/widget_win.h" | 30 #include "views/widget/widget_win.h" |
31 #include "views/window/window.h" | 31 #include "views/window/window.h" |
32 | 32 |
33 // This task just adds another task to the event queue. This is useful if | 33 // This task just adds another task to the event queue. This is useful if |
34 // you want to ensure that any tasks added to the event queue after this one | 34 // you want to ensure that any tasks added to the event queue after this one |
35 // have already been processed by the time |task| is run. | 35 // have already been processed by the time |task| is run. |
36 class InvokeTaskLaterTask : public Task { | 36 class InvokeTaskLaterTask : public Task { |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 | 535 |
536 void AutomationProvider::OnSetZoomLevel(int handle, int zoom_level) { | 536 void AutomationProvider::OnSetZoomLevel(int handle, int zoom_level) { |
537 if (tab_tracker_->ContainsHandle(handle)) { | 537 if (tab_tracker_->ContainsHandle(handle)) { |
538 NavigationController* tab = tab_tracker_->GetResource(handle); | 538 NavigationController* tab = tab_tracker_->GetResource(handle); |
539 if (tab->tab_contents() && tab->tab_contents()->render_view_host()) { | 539 if (tab->tab_contents() && tab->tab_contents()->render_view_host()) { |
540 tab->tab_contents()->render_view_host()->Zoom( | 540 tab->tab_contents()->render_view_host()->Zoom( |
541 static_cast<PageZoom::Function>(zoom_level)); | 541 static_cast<PageZoom::Function>(zoom_level)); |
542 } | 542 } |
543 } | 543 } |
544 } | 544 } |
OLD | NEW |