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/extensions/tab_helper.h" | 5 #include "chrome/browser/extensions/tab_helper.h" |
6 | 6 |
7 #include "chrome/browser/extensions/crx_installer.h" | 7 #include "chrome/browser/extensions/crx_installer.h" |
8 #include "chrome/browser/extensions/app_notify_channel_ui.h" | 8 #include "chrome/browser/extensions/app_notify_channel_ui.h" |
9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
10 #include "chrome/browser/extensions/page_action_controller.h" | 10 #include "chrome/browser/extensions/page_action_controller.h" |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 | 391 |
392 void TabHelper::OnImageLoaded(const gfx::Image& image, | 392 void TabHelper::OnImageLoaded(const gfx::Image& image, |
393 const std::string& extension_id, | 393 const std::string& extension_id, |
394 int index) { | 394 int index) { |
395 if (!image.IsEmpty()) { | 395 if (!image.IsEmpty()) { |
396 extension_app_icon_ = *image.ToSkBitmap(); | 396 extension_app_icon_ = *image.ToSkBitmap(); |
397 web_contents()->NotifyNavigationStateChanged(content::INVALIDATE_TYPE_TAB); | 397 web_contents()->NotifyNavigationStateChanged(content::INVALIDATE_TYPE_TAB); |
398 } | 398 } |
399 } | 399 } |
400 | 400 |
401 ExtensionWindowController* TabHelper::GetExtensionWindowController() const { | 401 WindowController* TabHelper::GetExtensionWindowController() const { |
402 content::WebContents* contents = web_contents(); | 402 content::WebContents* contents = web_contents(); |
403 TabContentsIterator tab_iterator; | 403 TabContentsIterator tab_iterator; |
404 for (; !tab_iterator.done(); ++tab_iterator) { | 404 for (; !tab_iterator.done(); ++tab_iterator) { |
405 if (contents == (*tab_iterator)->web_contents()) | 405 if (contents == (*tab_iterator)->web_contents()) |
406 return tab_iterator.browser()->extension_window_controller(); | 406 return tab_iterator.browser()->extension_window_controller(); |
407 } | 407 } |
408 | 408 |
409 return NULL; | 409 return NULL; |
410 } | 410 } |
411 | 411 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 // malware site etc). When this happens, we abort the shortcut update. | 444 // malware site etc). When this happens, we abort the shortcut update. |
445 NavigationEntry* entry = controller.GetLastCommittedEntry(); | 445 NavigationEntry* entry = controller.GetLastCommittedEntry(); |
446 if (entry) | 446 if (entry) |
447 GetApplicationInfo(entry->GetPageID()); | 447 GetApplicationInfo(entry->GetPageID()); |
448 else | 448 else |
449 pending_web_app_action_ = NONE; | 449 pending_web_app_action_ = NONE; |
450 } | 450 } |
451 } | 451 } |
452 | 452 |
453 } // namespace extensions | 453 } // namespace extensions |
OLD | NEW |