| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
| 2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
| 3 // LICENSE file. | 3 // LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/views/tab_contents/tab_contents_view_gtk.h" | 5 #include "chrome/browser/views/tab_contents/tab_contents_view_gtk.h" |
| 6 | 6 |
| 7 #include <gdk/gdk.h> | 7 #include <gdk/gdk.h> |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 | 9 |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 | 153 |
| 154 gfx::NativeWindow TabContentsViewGtk::GetTopLevelNativeWindow() const { | 154 gfx::NativeWindow TabContentsViewGtk::GetTopLevelNativeWindow() const { |
| 155 GtkWidget* window = gtk_widget_get_ancestor(GetNativeView(), GTK_TYPE_WINDOW); | 155 GtkWidget* window = gtk_widget_get_ancestor(GetNativeView(), GTK_TYPE_WINDOW); |
| 156 return window ? GTK_WINDOW(window) : NULL; | 156 return window ? GTK_WINDOW(window) : NULL; |
| 157 } | 157 } |
| 158 | 158 |
| 159 void TabContentsViewGtk::GetContainerBounds(gfx::Rect* out) const { | 159 void TabContentsViewGtk::GetContainerBounds(gfx::Rect* out) const { |
| 160 GetBounds(out, false); | 160 GetBounds(out, false); |
| 161 } | 161 } |
| 162 | 162 |
| 163 void TabContentsViewGtk::StartDragging(const WebDropData& drop_data) { | 163 void TabContentsViewGtk::StartDragging(const WebDropData& drop_data, |
| 164 WebDragOperationsMask ops) { |
| 164 drag_source_->StartDragging(drop_data, &last_mouse_down_); | 165 drag_source_->StartDragging(drop_data, &last_mouse_down_); |
| 166 // TODO(snej): Make use of WebDragOperationsMask |
| 165 } | 167 } |
| 166 | 168 |
| 167 void TabContentsViewGtk::OnContentsDestroy() { | 169 void TabContentsViewGtk::OnContentsDestroy() { |
| 168 // TODO(brettw) this seems like maybe it can be moved into OnDestroy and this | 170 // TODO(brettw) this seems like maybe it can be moved into OnDestroy and this |
| 169 // function can be deleted? If you're adding more here, consider whether it | 171 // function can be deleted? If you're adding more here, consider whether it |
| 170 // can be moved into OnDestroy which is a Windows message handler as the | 172 // can be moved into OnDestroy which is a Windows message handler as the |
| 171 // window is being torn down. | 173 // window is being torn down. |
| 172 | 174 |
| 173 // We don't want to try to handle drag events from this point on. | 175 // We don't want to try to handle drag events from this point on. |
| 174 drag_source_.reset(); | 176 drag_source_.reset(); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 | 217 |
| 216 void TabContentsViewGtk::StoreFocus() { | 218 void TabContentsViewGtk::StoreFocus() { |
| 217 NOTIMPLEMENTED(); | 219 NOTIMPLEMENTED(); |
| 218 } | 220 } |
| 219 | 221 |
| 220 void TabContentsViewGtk::RestoreFocus() { | 222 void TabContentsViewGtk::RestoreFocus() { |
| 221 NOTIMPLEMENTED(); | 223 NOTIMPLEMENTED(); |
| 222 SetInitialFocus(); | 224 SetInitialFocus(); |
| 223 } | 225 } |
| 224 | 226 |
| 225 void TabContentsViewGtk::UpdateDragCursor(bool is_drop_target) { | 227 void TabContentsViewGtk::UpdateDragCursor(WebDragOperation operation) { |
| 226 NOTIMPLEMENTED(); | 228 NOTIMPLEMENTED(); |
| 227 } | 229 } |
| 228 | 230 |
| 229 void TabContentsViewGtk::GotFocus() { | 231 void TabContentsViewGtk::GotFocus() { |
| 230 tab_contents()->delegate()->TabContentsFocused(tab_contents()); | 232 tab_contents()->delegate()->TabContentsFocused(tab_contents()); |
| 231 } | 233 } |
| 232 | 234 |
| 233 void TabContentsViewGtk::TakeFocus(bool reverse) { | 235 void TabContentsViewGtk::TakeFocus(bool reverse) { |
| 234 // This is called when we the renderer asks us to take focus back (i.e., it | 236 // This is called when we the renderer asks us to take focus back (i.e., it |
| 235 // has iterated past the last focusable element on the page). | 237 // has iterated past the last focusable element on the page). |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 | 311 |
| 310 private: | 312 private: |
| 311 DISALLOW_COPY_AND_ASSIGN(BlockedPopupContainerViewGtk); | 313 DISALLOW_COPY_AND_ASSIGN(BlockedPopupContainerViewGtk); |
| 312 }; | 314 }; |
| 313 | 315 |
| 314 // static | 316 // static |
| 315 BlockedPopupContainerView* BlockedPopupContainerView::Create( | 317 BlockedPopupContainerView* BlockedPopupContainerView::Create( |
| 316 BlockedPopupContainer* container) { | 318 BlockedPopupContainer* container) { |
| 317 return new BlockedPopupContainerViewGtk; | 319 return new BlockedPopupContainerViewGtk; |
| 318 } | 320 } |
| OLD | NEW |