OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/gtk/location_bar_view_gtk.h" | 5 #include "chrome/browser/ui/gtk/location_bar_view_gtk.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1370 gtk_image_set_from_pixbuf(GTK_IMAGE(image_.get()), | 1370 gtk_image_set_from_pixbuf(GTK_IMAGE(image_.get()), |
1371 GtkThemeService::GetFrom(parent_->browser()->profile())->GetImageNamed( | 1371 GtkThemeService::GetFrom(parent_->browser()->profile())->GetImageNamed( |
1372 content_setting_image_model_->get_icon())->ToGdkPixbuf()); | 1372 content_setting_image_model_->get_icon())->ToGdkPixbuf()); |
1373 | 1373 |
1374 gtk_widget_set_tooltip_text(widget(), | 1374 gtk_widget_set_tooltip_text(widget(), |
1375 content_setting_image_model_->get_tooltip().c_str()); | 1375 content_setting_image_model_->get_tooltip().c_str()); |
1376 gtk_widget_show_all(widget()); | 1376 gtk_widget_show_all(widget()); |
1377 | 1377 |
1378 TabSpecificContentSettings* content_settings = NULL; | 1378 TabSpecificContentSettings* content_settings = NULL; |
1379 if (web_contents) { | 1379 if (web_contents) { |
1380 content_settings = TabContents::GetOwningTabContentsForWebContents( | 1380 content_settings = |
1381 web_contents)->content_settings(); | 1381 TabContents::FromWebContents(web_contents)->content_settings(); |
1382 } | 1382 } |
1383 if (!content_settings || content_settings->IsBlockageIndicated( | 1383 if (!content_settings || content_settings->IsBlockageIndicated( |
1384 content_setting_image_model_->get_content_settings_type())) | 1384 content_setting_image_model_->get_content_settings_type())) |
1385 return; | 1385 return; |
1386 | 1386 |
1387 // The content blockage was not yet indicated to the user. Start indication | 1387 // The content blockage was not yet indicated to the user. Start indication |
1388 // animation and clear "not yet shown" flag. | 1388 // animation and clear "not yet shown" flag. |
1389 content_settings->SetBlockageHasBeenIndicated( | 1389 content_settings->SetBlockageHasBeenIndicated( |
1390 content_setting_image_model_->get_content_settings_type()); | 1390 content_setting_image_model_->get_content_settings_type()); |
1391 | 1391 |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1824 GdkModifierType modifier, | 1824 GdkModifierType modifier, |
1825 void* user_data) { | 1825 void* user_data) { |
1826 PageActionViewGtk* view = static_cast<PageActionViewGtk*>(user_data); | 1826 PageActionViewGtk* view = static_cast<PageActionViewGtk*>(user_data); |
1827 if (!gtk_widget_get_visible(view->widget())) | 1827 if (!gtk_widget_get_visible(view->widget())) |
1828 return FALSE; | 1828 return FALSE; |
1829 | 1829 |
1830 GdkEventButton event = {}; | 1830 GdkEventButton event = {}; |
1831 event.button = 1; | 1831 event.button = 1; |
1832 return view->OnButtonPressed(view->widget(), &event); | 1832 return view->OnButtonPressed(view->widget(), &event); |
1833 } | 1833 } |
OLD | NEW |