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/ui/views/tab_contents/tab_contents_view_touch.h" | 5 #include "chrome/browser/ui/views/tab_contents/tab_contents_view_touch.h" |
6 | 6 |
7 #include <X11/extensions/XInput2.h> | 7 #include <X11/extensions/XInput2.h> |
8 #undef Status | 8 #undef Status |
9 | 9 |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 // no longer be focusable (e.g. if the location bar was focused and then | 221 // no longer be focusable (e.g. if the location bar was focused and then |
222 // we switched to fullscreen mode). In that case we default to the | 222 // we switched to fullscreen mode). In that case we default to the |
223 // default focus. | 223 // default focus. |
224 SetInitialFocus(); | 224 SetInitialFocus(); |
225 } | 225 } |
226 view_storage->RemoveView(last_focused_view_storage_id_); | 226 view_storage->RemoveView(last_focused_view_storage_id_); |
227 } | 227 } |
228 } | 228 } |
229 | 229 |
230 void TabContentsViewTouch::UpdatePreferredSize(const gfx::Size& pref_size) { | 230 void TabContentsViewTouch::UpdatePreferredSize(const gfx::Size& pref_size) { |
| 231 tab_contents_->UpdatePreferredSize(pref_size); |
231 } | 232 } |
232 | 233 |
233 bool TabContentsViewTouch::IsDoingDrag() const { | 234 bool TabContentsViewTouch::IsDoingDrag() const { |
234 return false; | 235 return false; |
235 } | 236 } |
236 | 237 |
237 void TabContentsViewTouch::CancelDragAndCloseTab() { | 238 void TabContentsViewTouch::CancelDragAndCloseTab() { |
238 } | 239 } |
239 | 240 |
240 bool TabContentsViewTouch::IsEventTracking() const { | 241 bool TabContentsViewTouch::IsEventTracking() const { |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 rwhv->SetSize(size); | 430 rwhv->SetSize(size); |
430 | 431 |
431 if (needs_resize) | 432 if (needs_resize) |
432 SetFloatingPosition(size); | 433 SetFloatingPosition(size); |
433 } | 434 } |
434 | 435 |
435 void TabContentsViewTouch::SetFloatingPosition(const gfx::Size& size) { | 436 void TabContentsViewTouch::SetFloatingPosition(const gfx::Size& size) { |
436 // TODO(anicolao): rework this once we have WebUI views for dialogs | 437 // TODO(anicolao): rework this once we have WebUI views for dialogs |
437 SetBounds(x(), y(), size.width(), size.height()); | 438 SetBounds(x(), y(), size.width(), size.height()); |
438 } | 439 } |
OLD | NEW |