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 if (tab_contents_->delegate()) |
| 232 tab_contents_->delegate()->UpdatePreferredSize(pref_size); |
231 } | 233 } |
232 | 234 |
233 bool TabContentsViewTouch::IsDoingDrag() const { | 235 bool TabContentsViewTouch::IsDoingDrag() const { |
234 return false; | 236 return false; |
235 } | 237 } |
236 | 238 |
237 void TabContentsViewTouch::CancelDragAndCloseTab() { | 239 void TabContentsViewTouch::CancelDragAndCloseTab() { |
238 } | 240 } |
239 | 241 |
240 bool TabContentsViewTouch::IsEventTracking() const { | 242 bool TabContentsViewTouch::IsEventTracking() const { |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 rwhv->SetSize(size); | 431 rwhv->SetSize(size); |
430 | 432 |
431 if (needs_resize) | 433 if (needs_resize) |
432 SetFloatingPosition(size); | 434 SetFloatingPosition(size); |
433 } | 435 } |
434 | 436 |
435 void TabContentsViewTouch::SetFloatingPosition(const gfx::Size& size) { | 437 void TabContentsViewTouch::SetFloatingPosition(const gfx::Size& size) { |
436 // TODO(anicolao): rework this once we have WebUI views for dialogs | 438 // TODO(anicolao): rework this once we have WebUI views for dialogs |
437 SetBounds(x(), y(), size.width(), size.height()); | 439 SetBounds(x(), y(), size.width(), size.height()); |
438 } | 440 } |
OLD | NEW |