Home | History | Annotate | Download | only in extensions
      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
      3 // found in the LICENSE file.
      4 
      5 #include "chrome/browser/extensions/extension_tab_util.h"
      6 
      7 #include "base/logging.h"
      8 #include "chrome/browser/sessions/session_id.h"
      9 #include "url/gurl.h"
     10 
     11 using base::DictionaryValue;
     12 using base::ListValue;
     13 using content::WebContents;
     14 
     15 int ExtensionTabUtil::GetWindowId(const Browser* browser) {
     16   NOTIMPLEMENTED();
     17   return -1;
     18 }
     19 
     20 int ExtensionTabUtil::GetWindowIdOfTabStripModel(
     21     const TabStripModel* tab_strip_model) {
     22   NOTIMPLEMENTED();
     23   return -1;
     24 }
     25 
     26 int ExtensionTabUtil::GetTabId(const WebContents* web_contents) {
     27   return SessionID::IdForTab(web_contents);
     28 }
     29 
     30 int ExtensionTabUtil::GetWindowIdOfTab(const WebContents* web_contents) {
     31   NOTIMPLEMENTED();
     32   return -1;
     33 }
     34 
     35 DictionaryValue* ExtensionTabUtil::CreateTabValue(
     36     const WebContents* contents,
     37     TabStripModel* tab_strip,
     38     int tab_index,
     39     const extensions::Extension* extension) {
     40   NOTIMPLEMENTED();
     41   return NULL;
     42 }
     43 
     44 ListValue* ExtensionTabUtil::CreateTabList(
     45     const Browser* browser,
     46     const extensions::Extension* extension) {
     47   NOTIMPLEMENTED();
     48   return NULL;
     49 }
     50 
     51 DictionaryValue* ExtensionTabUtil::CreateTabValue(
     52     const WebContents* contents,
     53     TabStripModel* tab_strip,
     54     int tab_index) {
     55   NOTIMPLEMENTED();
     56   return NULL;
     57 }
     58 
     59 bool ExtensionTabUtil::GetTabStripModel(const WebContents* web_contents,
     60                                         TabStripModel** tab_strip_model,
     61                                         int* tab_index) {
     62   NOTIMPLEMENTED();
     63   return false;
     64 }
     65 
     66 bool ExtensionTabUtil::GetDefaultTab(Browser* browser,
     67                                      content::WebContents** contents,
     68                                      int* tab_id) {
     69   NOTIMPLEMENTED();
     70   return false;
     71 }
     72 
     73 bool ExtensionTabUtil::GetTabById(int tab_id,
     74                                   Profile* profile,
     75                                   bool include_incognito,
     76                                   Browser** browser,
     77                                   TabStripModel** tab_strip,
     78                                   content::WebContents** contents,
     79                                   int* tab_index) {
     80   NOTIMPLEMENTED();
     81   return false;
     82 }
     83 
     84 GURL ExtensionTabUtil::ResolvePossiblyRelativeURL(const std::string& url_string,
     85     const extensions::Extension* extension) {
     86   NOTIMPLEMENTED();
     87   return GURL();
     88 }
     89 
     90 bool ExtensionTabUtil::IsCrashURL(const GURL& url) {
     91   NOTIMPLEMENTED();
     92   return false;
     93 }
     94 
     95 void ExtensionTabUtil::CreateTab(WebContents* web_contents,
     96                                  const std::string& extension_id,
     97                                  WindowOpenDisposition disposition,
     98                                  const gfx::Rect& initial_pos,
     99                                  bool user_gesture) {
    100   NOTIMPLEMENTED();
    101 }
    102 
    103 // static
    104 void ExtensionTabUtil::ForEachTab(
    105     const base::Callback<void(WebContents*)>& callback) {
    106   NOTIMPLEMENTED();
    107 }
    108 
    109 // static
    110 extensions::WindowController* ExtensionTabUtil::GetWindowControllerOfTab(
    111     const WebContents* web_contents) {
    112   NOTIMPLEMENTED();
    113   return NULL;
    114 }
    115