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" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 switch (type_) { | 100 switch (type_) { |
101 case ui::ET_MOUSE_PRESSED: | 101 case ui::ET_MOUSE_PRESSED: |
102 view_->OnMousePressed(event); | 102 view_->OnMousePressed(event); |
103 break; | 103 break; |
104 | 104 |
105 case ui::ET_MOUSE_DRAGGED: | 105 case ui::ET_MOUSE_DRAGGED: |
106 view_->OnMouseDragged(event); | 106 view_->OnMouseDragged(event); |
107 break; | 107 break; |
108 | 108 |
109 case ui::ET_MOUSE_RELEASED: | 109 case ui::ET_MOUSE_RELEASED: |
110 view_->OnMouseReleased(event, false); | 110 view_->OnMouseReleased(event); |
111 break; | 111 break; |
112 | 112 |
113 default: | 113 default: |
114 NOTREACHED(); | 114 NOTREACHED(); |
115 } | 115 } |
116 } | 116 } |
117 | 117 |
118 private: | 118 private: |
119 views::View* view_; | 119 views::View* view_; |
120 ui::EventType type_; | 120 ui::EventType type_; |
(...skipping 414 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 |